Skip to content

Commit

Permalink
Fix annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
thegridman committed Aug 9, 2023
1 parent 2010c70 commit 4b64b09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib_ecstasy/src/main/x/ecstasy/annotations/Test.x
Expand Up @@ -45,7 +45,7 @@
* The parameters are ignored when the annotation is used on classes and properties. Any usage other
* than that specified above may result in a compile-time and/or load/link-time error.
*/
mixin Test(String group = Unit, , Int priority = Int.MaxValue, String[] tags = [])
mixin Test(String group = Unit, Int priority = Int.MaxValue, String[] tags = [])
extends Iff("test".defined)
implements Orderable {

Expand Down Expand Up @@ -74,9 +74,9 @@ mixin Test(String group = Unit, , Int priority = Int.MaxValue, String[] tags = [
*/
static String Omit = "omit";


// ----- Orderable -----------------------------------------------------------------------------

static <CompileType extends Test> Ordered compare(CompileType value1, CompileType value2) {
return value1.priority <=> value2.priority;
}
}
5 changes: 5 additions & 0 deletions lib_xunit/src/main/x/xunit.x
Expand Up @@ -22,6 +22,11 @@ module xunit.xtclang.org {
}
}

/**
* The valid targets for a Test annotation.
*/
typedef Module | Package | Class | Property | Method | Function as TestTarget;

/**
* An `PreconditionFailed` exception is raised when a test precondition fails.
*
Expand Down
2 changes: 1 addition & 1 deletion lib_xunit/src/main/x/xunit/annotations/Disabled.x
Expand Up @@ -10,4 +10,4 @@
* @param reason the reason for disabling the test.
*/
mixin Disabled(String reason)
into Test.TestTarget;
into TestTarget;

0 comments on commit 4b64b09

Please sign in to comment.