Skip to content

Commit

Permalink
Comments + disabled test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Mar 20, 2023
1 parent 3fdb15d commit 88823b1
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.junit.jupiter.api.extension.ExtendWith;

import org.lflang.federated.generator.FedFileConfig;
import org.lflang.generator.GeneratorUtils;
import org.lflang.generator.LFGenerator;
import org.lflang.generator.LFGeneratorContext.Mode;
import org.lflang.generator.MainContext;
Expand All @@ -24,7 +25,7 @@
@InjectWith(LFInjectorProvider.class)

/**
*
* Tests for checking that target properties adequately translate into the target configuration.
*/
class TargetConfigTests {

Expand All @@ -49,6 +50,10 @@ private void assertHasTargetProperty(Model model, String name) {
);
}

/**
* Check that tracing target property affects the target configuration.
* @throws Exception
*/
@Test
public void testParsing() throws Exception {
assertHasTargetProperty(parser.parse("""
Expand All @@ -58,6 +63,11 @@ public void testParsing() throws Exception {
"""), "tracing");
}

/**
* Check that when a federation has the "tracing" target property set, the generated federates
* will also have it set.
* @throws Exception
*/
@Test
public void testFederation() throws Exception {
fileAccess.setOutputPath("src-gen");
Expand All @@ -79,6 +89,8 @@ public void testFederation() throws Exception {
var resource = federation.eResource();
var context = new MainContext(Mode.STANDALONE, resource, fileAccess, () -> false);

if (GeneratorUtils.isHostWindows()) return;

generator.doGenerate(resource, fileAccess, context);

String lfSrc = Files.readAllLines(
Expand Down

0 comments on commit 88823b1

Please sign in to comment.