From 6e543d2563a5ce47ae7c89b61e9aa6ff6db3da4f Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Wed, 19 Jul 2023 20:49:56 +0300 Subject: [PATCH] Fix annotations --- lib_ecstasy/src/main/x/ecstasy/annotations/Test.x | 4 ++-- lib_xunit/src/main/x/xunit.x | 5 +++++ lib_xunit/src/main/x/xunit/annotations/Disabled.x | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib_ecstasy/src/main/x/ecstasy/annotations/Test.x b/lib_ecstasy/src/main/x/ecstasy/annotations/Test.x index 739188d2c2..c2a1c2a58b 100644 --- a/lib_ecstasy/src/main/x/ecstasy/annotations/Test.x +++ b/lib_ecstasy/src/main/x/ecstasy/annotations/Test.x @@ -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 { @@ -74,9 +74,9 @@ mixin Test(String group = Unit, , Int priority = Int.MaxValue, String[] tags = [ */ static String Omit = "omit"; - // ----- Orderable ----------------------------------------------------------------------------- static Ordered compare(CompileType value1, CompileType value2) { return value1.priority <=> value2.priority; + } } \ No newline at end of file diff --git a/lib_xunit/src/main/x/xunit.x b/lib_xunit/src/main/x/xunit.x index d49c8dd314..9eb88c29de 100644 --- a/lib_xunit/src/main/x/xunit.x +++ b/lib_xunit/src/main/x/xunit.x @@ -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. * diff --git a/lib_xunit/src/main/x/xunit/annotations/Disabled.x b/lib_xunit/src/main/x/xunit/annotations/Disabled.x index 471fb94179..b76935beed 100644 --- a/lib_xunit/src/main/x/xunit/annotations/Disabled.x +++ b/lib_xunit/src/main/x/xunit/annotations/Disabled.x @@ -10,4 +10,4 @@ * @param reason the reason for disabling the test. */ mixin Disabled(String reason) - into Test.TestTarget; + into TestTarget;