Skip to content

Commit

Permalink
Rename generic -> miscellaneous.
Browse files Browse the repository at this point in the history
The intent is to reduce confusion with the language feature "generics."
  • Loading branch information
petervdonovan committed Jun 5, 2023
1 parent 5b445ca commit ba1268d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ protected boolean supportsDockerOption() {
}

@Test
public void runGenericTests() {
public void runMiscellaneousTests() {
runTestsForTargets(
Message.DESC_GENERIC,
TestCategory.GENERIC::equals,
Message.DESC_MISCELLANEOUS,
TestCategory.MISCELLANEOUS::equals,
Configurators::noChanges,
TestLevel.EXECUTION,
false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ protected boolean supportsDockerOption() {

@Test
@Override
public void runGenericTests() {
super.runGenericTests();
public void runMiscellaneousTests() {
super.runMiscellaneousTests();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ public void buildZephyrTests() {
}

@Test
public void buildGenericTests() {
public void buildMiscellaneousTests() {
Assumptions.assumeTrue(isLinux(), "Zephyr tests only run on Linux");
super.runTestsFor(
List.of(Target.C),
Message.DESC_GENERIC,
TestCategory.GENERIC::equals,
Message.DESC_MISCELLANEOUS,
TestCategory.MISCELLANEOUS::equals,
Configurators::makeZephyrCompatibleUnthreaded,
TestLevel.BUILD,
false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ protected boolean supportsEnclaves() {

@Test
@Override
public void runGenericTests() {
super.runGenericTests();
public void runMiscellaneousTests() {
super.runMiscellaneousTests();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ protected boolean supportsDockerOption() {

@Test
@Override
public void runGenericTests() {
super.runGenericTests();
public void runMiscellaneousTests() {
super.runMiscellaneousTests();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ protected boolean supportsFederatedExecution() {

@Test
@Override
public void runGenericTests() {
super.runGenericTests();
public void runMiscellaneousTests() {
super.runMiscellaneousTests();
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion core/src/testFixtures/java/org/lflang/tests/TestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static class Message {

/* Descriptions of collections of tests. */
public static final String DESC_SERIALIZATION = "Run serialization tests.";
public static final String DESC_GENERIC = "Run generic tests.";
public static final String DESC_MISCELLANEOUS = "Run miscellaneous tests.";
public static final String DESC_GENERICS = "Run generics tests.";
public static final String DESC_TYPE_PARMS = "Run tests for reactors with type parameters.";
public static final String DESC_MULTIPORT = "Run multiport tests.";
Expand Down
8 changes: 4 additions & 4 deletions core/src/testFixtures/java/org/lflang/tests/TestRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public enum TestCategory {
CONCURRENT(true),
/** Test about enclaves */
ENCLAVE(false),
/** Generic tests, ie, tests that all targets are supposed to implement. */
GENERIC(true),
/** Tests about generics, not to confuse with {@link #GENERIC}. */
/** Miscellaneous tests, ie, tests that all targets are supposed to implement. */
MISCELLANEOUS(true),
/** Tests about generics. */
GENERICS(true),
/** Tests about multiports and banks of reactors. */
MULTIPORT(true),
Expand Down Expand Up @@ -313,7 +313,7 @@ public static class TestDirVisitor extends SimpleFileVisitor<Path> {
* @param srcBasePath The test sources directory
*/
public TestDirVisitor(ResourceSet rs, Target target, Path srcBasePath) {
stack.push(TestCategory.GENERIC);
stack.push(TestCategory.MISCELLANEOUS);
this.rs = rs;
this.target = target;
this.srcBasePath = srcBasePath;
Expand Down

1 comment on commit ba1268d

@lhstrh
Copy link
Member

@lhstrh lhstrh commented on ba1268d Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think "miscellaneous" is the right term. It suggests "extra" or "whatever doesn't fit ordinary categories" but that is not what is meant here. They are the most basic tests that all targets should be able to pass. Special categories are there because we don't expect them to be shared across targets.

Please sign in to comment.