lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.tests.compiler.LinguaFrancaValidationTest Class Reference

Collection of unit tests to ensure validation is done correctly. More...

Public Member Functions

void afterBreaksCycle () throws Exception
 Let cyclic dependencies be broken by "after" clauses.
void afterBreaksCycle2 () throws Exception
 Let cyclic dependencies be broken by "after" clauses with zero delay.
void afterBreaksCycle3 () throws Exception
 Let cyclic dependencies be broken by "after" clauses with zero delay and no units.
void checkCargoDependencyProperty () throws Exception
void checkPlatformProperty () throws Exception
Collection< DynamicTest > checkTargetProperties () throws Exception
 Perform checks on target properties.
void connectionToEffectPort () throws Exception
 Disallow connection to port that is effect of reaction.
void connectionToEffectPort2 () throws Exception
 Disallow connection to port that is effect of reaction.
void connectionToEffectPort3 () throws Exception
 Allow connection to the port of a contained reactor if another port with same name is effect of a reaction.
void connectionToEffectPort3_5 () throws Exception
 Allow connection to the port of a contained reactor if another port with same name is effect of a reaction.
void connectionToEffectPort4 () throws Exception
 Disallow connection to the port of a contained reactor if the same port is effect of a reaction.
void detectCausalityLoop () throws Exception
 Detect causality loop.
void detectInstantiationCycle () throws Exception
 Detect cycles in the instantiation graph.
void detectInstantiationCycle2 () throws Exception
 Detect cycles in the instantiation graph.
void disallowBraceInitialization (String target) throws Exception
void disallowMainWithDifferentNameThanFile () throws Exception
void disallowParenthesisInitialization (String target) throws Exception
void disallowReactorCalledPreamble () throws Exception
 Check that reactors in C++ cannot be named preamble.
void disallowUnderscoreActions () throws Exception
 Ensure that "__" is not allowed at the start of an action name.
void disallowUnderscoreInputs () throws Exception
 Ensure that "__" is not allowed at the start of an input name.
void disallowUnderscoreOutputs () throws Exception
 Ensure that "__" is not allowed at the start of an output name.
void disallowUnderscoreParameters () throws Exception
 Ensure that "__" is not allowed at the start of a parameter name.
void disallowUnderscoreReactorDef () throws Exception
 Ensure that "__" is not allowed at the start of a reactor definition name.
void disallowUnderscoreReactorInstantiation () throws Exception
 Ensure that "__" is not allowed at the start of a reactor instantiation name.
void disallowUnderscoreStates () throws Exception
 Ensure that "__" is not allowed at the start of an state name.
void disallowUnderscoreTimers () throws Exception
 Ensure that "__" is not allowed at the start of a timer name.
void duplicateVariable () throws Exception
 Ensure that duplicate identifiers for actions reported.
void missingTrigger () throws Exception
 Report missing trigger.
void multipleConnectionsToInputTest () throws Exception
 Disallow connection of multiple ports to the same input port.
void multipleLabels () throws Exception
 Assert no issues when multiple labels are used.
void nonzeroAfterMustHaveUnits () throws Exception
 Detect missing units in "after" clauses with delay greater than zero.
void nonZeroTimeValueWithoutUnits () throws Exception
 Report non-zero time value without units.
void noSemicolonIfNotAmbiguous () throws Exception
void overflowingAssignmentC () throws Exception
 Report overflowing assignment.
void overflowingDeadlineC () throws Exception
 Report overflowing deadline.
void overflowingParameterC () throws Exception
 Report overflowing parameter.
void parameterTypeMismatch () throws Exception
 Report reference to non-time parameter in time argument.
void recognizeHostNames () throws Exception
 Recognize valid host names and fully qualified names, report invalid ones.
void recognizeIPV4 () throws Exception
 Recognize valid IPV4 addresses, report invalid ones.
void recognizeIPV6 () throws Exception
 Recognize valid IPV6 addresses, report invalid ones.
void requireSemicolonIfAmbiguous () throws Exception
void stateAndParameterDeclarationsInC () throws Exception
 Tests for state and parameter declarations, including native lists.
void targetCodeInTimeArgument () throws Exception
 Report inappropriate literal in time argument.
void testCppMutableInput () throws Exception
void testFederatedHasInput () throws Exception
void testFederatedHasOutput () throws Exception
void testFederationSupport () throws Exception
void testImportedCyclicReactor () throws Exception
void testInheritanceSupport () throws Exception
void testInitialMode () throws Exception
void testInitialModes () throws Exception
void testInvalidTargetParam () throws Exception
void testMainHasInput () throws Exception
void testMainHasOutput () throws Exception
void testMainReactorHasHost () throws Exception
void testMissingInputType () throws Exception
void testMissingModeStateReset () throws Exception
void testMissingModeStateResetInstance () throws Exception
void testMissingName () throws Exception
void testMissingOutputType () throws Exception
void testMissingStateType () throws Exception
void testModeActionNamespace () throws Exception
void testModeInstanceNamespace () throws Exception
void testModeStateNamespace () throws Exception
void testModeStateResetWithoutInitialValue () throws Exception
void testModeTimerNamespace () throws Exception
void testMultipleFederatedReactor () throws Exception
void testMultipleMainOrFederatedReactor () throws Exception
void testMultipleMainReactor () throws Exception
void testMultipleMainReactorUnnamed () throws Exception
void testMutuallyExclusiveThreadingParams () throws Exception
void testOverflowingDeadline () throws Exception
void testPreambleVisibility () throws Exception
 Test warnings and errors for the target dependent preamble visibility qualifiers.
void testTargetParamNotSupportedForTarget () throws Exception
void testUnnamedReactor () throws Exception
void testUnrecognizedTarget () throws Exception
void testUnspecifiedTransitionType () throws Exception
void testUnusedImport () throws Exception
void testWrongParamType () throws Exception
void testWrongStructureForLabelAttribute () throws Exception
void tracingOptionsCpp () throws Exception
 Ensure that duplicate identifiers for actions reported.
void warnAgainstMultipleTypes () throws Exception
 Warn against using multiple types in connection statement.

Package Attributes

Map< TargetPropertyType, List< List< Object > > > compositeTypeToKnownBad
 Maps a type to a list, each entry of which represents a list with three entries: a known wrong value, the suffix to add to the reported name, and the type that it should be.
ParseHelper< Model > parser
Map< PrimitiveType, List< String > > primitiveTypeToKnownBad
 Maps a type to a list of known bad values.
Map< PrimitiveType, List< String > > primitiveTypeToKnownGood
 Maps a type to a list of known good values.
ValidationTestHelper validator

Detailed Description

Collection of unit tests to ensure validation is done correctly.

Author
Edward A. Lee
Marten Lohstroh
Matt Weber
Christian Menard
Alexander Schulz-Rosengarten

Member Function Documentation

◆ afterBreaksCycle()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.afterBreaksCycle ( ) throws Exception

Let cyclic dependencies be broken by "after" clauses.

◆ afterBreaksCycle2()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.afterBreaksCycle2 ( ) throws Exception

Let cyclic dependencies be broken by "after" clauses with zero delay.

◆ afterBreaksCycle3()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.afterBreaksCycle3 ( ) throws Exception

Let cyclic dependencies be broken by "after" clauses with zero delay and no units.

◆ checkCargoDependencyProperty()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.checkCargoDependencyProperty ( ) throws Exception

◆ checkPlatformProperty()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.checkPlatformProperty ( ) throws Exception

◆ checkTargetProperties()

Collection< DynamicTest > org.lflang.tests.compiler.LinguaFrancaValidationTest.checkTargetProperties ( ) throws Exception

Perform checks on target properties.

◆ connectionToEffectPort()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.connectionToEffectPort ( ) throws Exception

Disallow connection to port that is effect of reaction.

◆ connectionToEffectPort2()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.connectionToEffectPort2 ( ) throws Exception

Disallow connection to port that is effect of reaction.

◆ connectionToEffectPort3()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.connectionToEffectPort3 ( ) throws Exception

Allow connection to the port of a contained reactor if another port with same name is effect of a reaction.

◆ connectionToEffectPort3_5()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.connectionToEffectPort3_5 ( ) throws Exception

Allow connection to the port of a contained reactor if another port with same name is effect of a reaction.

◆ connectionToEffectPort4()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.connectionToEffectPort4 ( ) throws Exception

Disallow connection to the port of a contained reactor if the same port is effect of a reaction.

◆ detectCausalityLoop()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.detectCausalityLoop ( ) throws Exception

Detect causality loop.

◆ detectInstantiationCycle()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.detectInstantiationCycle ( ) throws Exception

Detect cycles in the instantiation graph.

◆ detectInstantiationCycle2()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.detectInstantiationCycle2 ( ) throws Exception

Detect cycles in the instantiation graph.

◆ disallowBraceInitialization()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowBraceInitialization ( String target) throws Exception

◆ disallowMainWithDifferentNameThanFile()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowMainWithDifferentNameThanFile ( ) throws Exception

◆ disallowParenthesisInitialization()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowParenthesisInitialization ( String target) throws Exception

◆ disallowReactorCalledPreamble()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowReactorCalledPreamble ( ) throws Exception

Check that reactors in C++ cannot be named preamble.

◆ disallowUnderscoreActions()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreActions ( ) throws Exception

Ensure that "__" is not allowed at the start of an action name.

◆ disallowUnderscoreInputs()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreInputs ( ) throws Exception

Ensure that "__" is not allowed at the start of an input name.

◆ disallowUnderscoreOutputs()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreOutputs ( ) throws Exception

Ensure that "__" is not allowed at the start of an output name.

◆ disallowUnderscoreParameters()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreParameters ( ) throws Exception

Ensure that "__" is not allowed at the start of a parameter name.

◆ disallowUnderscoreReactorDef()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreReactorDef ( ) throws Exception

Ensure that "__" is not allowed at the start of a reactor definition name.

◆ disallowUnderscoreReactorInstantiation()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreReactorInstantiation ( ) throws Exception

Ensure that "__" is not allowed at the start of a reactor instantiation name.

◆ disallowUnderscoreStates()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreStates ( ) throws Exception

Ensure that "__" is not allowed at the start of an state name.

◆ disallowUnderscoreTimers()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.disallowUnderscoreTimers ( ) throws Exception

Ensure that "__" is not allowed at the start of a timer name.

◆ duplicateVariable()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.duplicateVariable ( ) throws Exception

Ensure that duplicate identifiers for actions reported.

◆ missingTrigger()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.missingTrigger ( ) throws Exception

Report missing trigger.

◆ multipleConnectionsToInputTest()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.multipleConnectionsToInputTest ( ) throws Exception

Disallow connection of multiple ports to the same input port.

◆ multipleLabels()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.multipleLabels ( ) throws Exception

Assert no issues when multiple labels are used.

◆ nonzeroAfterMustHaveUnits()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.nonzeroAfterMustHaveUnits ( ) throws Exception

Detect missing units in "after" clauses with delay greater than zero.

◆ nonZeroTimeValueWithoutUnits()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.nonZeroTimeValueWithoutUnits ( ) throws Exception

Report non-zero time value without units.

◆ noSemicolonIfNotAmbiguous()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.noSemicolonIfNotAmbiguous ( ) throws Exception

◆ overflowingAssignmentC()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.overflowingAssignmentC ( ) throws Exception

Report overflowing assignment.

◆ overflowingDeadlineC()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.overflowingDeadlineC ( ) throws Exception

Report overflowing deadline.

◆ overflowingParameterC()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.overflowingParameterC ( ) throws Exception

Report overflowing parameter.

◆ parameterTypeMismatch()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.parameterTypeMismatch ( ) throws Exception

Report reference to non-time parameter in time argument.

◆ recognizeHostNames()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.recognizeHostNames ( ) throws Exception

Recognize valid host names and fully qualified names, report invalid ones.

◆ recognizeIPV4()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.recognizeIPV4 ( ) throws Exception

Recognize valid IPV4 addresses, report invalid ones.

◆ recognizeIPV6()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.recognizeIPV6 ( ) throws Exception

Recognize valid IPV6 addresses, report invalid ones.

◆ requireSemicolonIfAmbiguous()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.requireSemicolonIfAmbiguous ( ) throws Exception

◆ stateAndParameterDeclarationsInC()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.stateAndParameterDeclarationsInC ( ) throws Exception

Tests for state and parameter declarations, including native lists.

◆ targetCodeInTimeArgument()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.targetCodeInTimeArgument ( ) throws Exception

Report inappropriate literal in time argument.

◆ testCppMutableInput()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testCppMutableInput ( ) throws Exception

◆ testFederatedHasInput()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testFederatedHasInput ( ) throws Exception

◆ testFederatedHasOutput()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testFederatedHasOutput ( ) throws Exception

◆ testFederationSupport()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testFederationSupport ( ) throws Exception

◆ testImportedCyclicReactor()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testImportedCyclicReactor ( ) throws Exception

◆ testInheritanceSupport()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testInheritanceSupport ( ) throws Exception

◆ testInitialMode()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testInitialMode ( ) throws Exception

◆ testInitialModes()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testInitialModes ( ) throws Exception

◆ testInvalidTargetParam()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testInvalidTargetParam ( ) throws Exception

◆ testMainHasInput()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMainHasInput ( ) throws Exception

◆ testMainHasOutput()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMainHasOutput ( ) throws Exception

◆ testMainReactorHasHost()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMainReactorHasHost ( ) throws Exception

◆ testMissingInputType()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMissingInputType ( ) throws Exception

◆ testMissingModeStateReset()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMissingModeStateReset ( ) throws Exception

◆ testMissingModeStateResetInstance()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMissingModeStateResetInstance ( ) throws Exception

◆ testMissingName()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMissingName ( ) throws Exception

◆ testMissingOutputType()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMissingOutputType ( ) throws Exception

◆ testMissingStateType()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMissingStateType ( ) throws Exception

◆ testModeActionNamespace()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testModeActionNamespace ( ) throws Exception

◆ testModeInstanceNamespace()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testModeInstanceNamespace ( ) throws Exception

◆ testModeStateNamespace()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testModeStateNamespace ( ) throws Exception

◆ testModeStateResetWithoutInitialValue()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testModeStateResetWithoutInitialValue ( ) throws Exception

◆ testModeTimerNamespace()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testModeTimerNamespace ( ) throws Exception

◆ testMultipleFederatedReactor()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMultipleFederatedReactor ( ) throws Exception

◆ testMultipleMainOrFederatedReactor()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMultipleMainOrFederatedReactor ( ) throws Exception

◆ testMultipleMainReactor()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMultipleMainReactor ( ) throws Exception

◆ testMultipleMainReactorUnnamed()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMultipleMainReactorUnnamed ( ) throws Exception

◆ testMutuallyExclusiveThreadingParams()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testMutuallyExclusiveThreadingParams ( ) throws Exception

◆ testOverflowingDeadline()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testOverflowingDeadline ( ) throws Exception

◆ testPreambleVisibility()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testPreambleVisibility ( ) throws Exception

Test warnings and errors for the target dependent preamble visibility qualifiers.

◆ testTargetParamNotSupportedForTarget()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testTargetParamNotSupportedForTarget ( ) throws Exception

◆ testUnnamedReactor()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testUnnamedReactor ( ) throws Exception

◆ testUnrecognizedTarget()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testUnrecognizedTarget ( ) throws Exception

◆ testUnspecifiedTransitionType()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testUnspecifiedTransitionType ( ) throws Exception

◆ testUnusedImport()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testUnusedImport ( ) throws Exception

◆ testWrongParamType()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testWrongParamType ( ) throws Exception

◆ testWrongStructureForLabelAttribute()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.testWrongStructureForLabelAttribute ( ) throws Exception

◆ tracingOptionsCpp()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.tracingOptionsCpp ( ) throws Exception

Ensure that duplicate identifiers for actions reported.

◆ warnAgainstMultipleTypes()

void org.lflang.tests.compiler.LinguaFrancaValidationTest.warnAgainstMultipleTypes ( ) throws Exception

Warn against using multiple types in connection statement.

Member Data Documentation

◆ compositeTypeToKnownBad

Map<TargetPropertyType, List<List<Object> > > org.lflang.tests.compiler.LinguaFrancaValidationTest.compositeTypeToKnownBad
package
Initial value:
=
Map.of(
List.of(
List.of("[1 msec]", LfPackage.eINSTANCE.getElement(), PrimitiveType.STRING),
List.of(
"[foo, {bar: baz}]", LfPackage.eINSTANCE.getElement(), PrimitiveType.STRING),
List.of(
"{bar: baz}", LfPackage.eINSTANCE.getKeyValuePair(), ArrayType.STRING_ARRAY)),
List.of(
List.of("[1 msec]", LfPackage.eINSTANCE.getElement(), PrimitiveType.STRING),
List.of(
"[foo, {bar: baz}]", LfPackage.eINSTANCE.getElement(), PrimitiveType.STRING),
List.of(
"{bar: baz}",
LfPackage.eINSTANCE.getKeyValuePair(),
List.of(
List.of(
"[bar, baz]",
LfPackage.eINSTANCE.getKeyValuePair(),
List.of(
"{name: [1, 2, 3]}", LfPackage.eINSTANCE.getElement(), new PlatformType()),
List.of(
"{name: {bar: baz}}", LfPackage.eINSTANCE.getElement(), new PlatformType()),
List.of(
"{board: [1, 2, 3]}", LfPackage.eINSTANCE.getElement(), PrimitiveType.STRING),
List.of(
"{board: {bar: baz}}",
LfPackage.eINSTANCE.getElement(),
List.of(
"{baud-rate: [1, 2, 3]}",
LfPackage.eINSTANCE.getElement(),
List.of(
"{baud-rate: {bar: baz}}",
LfPackage.eINSTANCE.getElement(),
List.of(
List.of("[1 msec]", LfPackage.eINSTANCE.getElement(), PrimitiveType.FILE),
List.of(
"[foo, {bar: baz}]", LfPackage.eINSTANCE.getElement(), PrimitiveType.FILE),
List.of(
"{bar: baz}",
LfPackage.eINSTANCE.getKeyValuePair(),
List.of(
List.of("foo", LfPackage.eINSTANCE.getKeyValuePair(), UnionType.DOCKER_UNION),
List.of("[1]", LfPackage.eINSTANCE.getKeyValuePair(), UnionType.DOCKER_UNION),
List.of(
"{bar: baz}",
LfPackage.eINSTANCE.getKeyValuePair(),
List.of(
"{builder-base: [1, 2, 3]}",
LfPackage.eINSTANCE.getElement(),
List.of(
List.of("foo", LfPackage.eINSTANCE.getKeyValuePair(), UnionType.TRACING_UNION),
List.of("[1]", LfPackage.eINSTANCE.getKeyValuePair(), UnionType.TRACING_UNION),
List.of(
"{bar: baz}",
LfPackage.eINSTANCE.getKeyValuePair(),
List.of(
"{trace-file-name: [1, 2, 3]}",
LfPackage.eINSTANCE.getElement(),
Enumeration of supported platforms.
Definition PlatformType.java:6
An array type of which the elements confirm to a given type.
Definition ArrayType.java:13
STRING_ARRAY
Definition ArrayType.java:14
A dictionary type with a predefined set of possible keys and assignable types.
Definition DictionaryType.java:24
TRACING_DICT
Definition DictionaryType.java:29
DOCKER_DICT
Definition DictionaryType.java:26
Primitive types for target properties, each with a description used in error messages and predicate u...
Definition PrimitiveType.java:14
NON_NEGATIVE_INTEGER
Definition PrimitiveType.java:30
FILE
Definition PrimitiveType.java:52
STRING
Definition PrimitiveType.java:49
A type that can assume one of several types.
Definition UnionType.java:16
FILE_OR_FILE_ARRAY
Definition UnionType.java:19
DOCKER_UNION
Definition UnionType.java:20
TRACING_UNION
Definition UnionType.java:21
PLATFORM_STRING_OR_DICTIONARY
Definition UnionType.java:18
STRING_OR_STRING_ARRAY
Definition UnionType.java:17

Maps a type to a list, each entry of which represents a list with three entries: a known wrong value, the suffix to add to the reported name, and the type that it should be.

◆ parser

ParseHelper<Model> org.lflang.tests.compiler.LinguaFrancaValidationTest.parser
package

◆ primitiveTypeToKnownBad

Map<PrimitiveType, List<String> > org.lflang.tests.compiler.LinguaFrancaValidationTest.primitiveTypeToKnownBad
package
Initial value:
=
Map.of(
List.of("1 sec", "foo", "\"foo\"", "[1]", "{baz: 42}", "'c'"),
List.of("foo", "\"bar\"", "1 sec", "[1, 2]", "{foo: \"bar\"}", "'c'"),
List.of("-42", "foo", "\"bar\"", "1 sec", "[1, 2]", "{foo: \"bar\"}", "'c'"),
List.of("foo", "\"bar\"", "\"3 sec\"", "\"4 weeks\"", "[1, 2]", "{foo: \"bar\"}", "'c'"),
List.of("1 msec", "[1, 2]", "{foo: \"bar\"}", "'c'"),
List.of("\"\""))
BOOLEAN
Definition PrimitiveType.java:15
TIME_VALUE
Definition PrimitiveType.java:41
INTEGER
Definition PrimitiveType.java:20

Maps a type to a list of known bad values.

◆ primitiveTypeToKnownGood

Map<PrimitiveType, List<String> > org.lflang.tests.compiler.LinguaFrancaValidationTest.primitiveTypeToKnownGood
package
Initial value:
=
Map.of(
PrimitiveType.BOOLEAN, List.of("true", "\"true\"", "false", "\"false\""),
PrimitiveType.INTEGER, List.of("0", "1", "\"42\"", "\"-1\"", "-2"),
PrimitiveType.NON_NEGATIVE_INTEGER, List.of("0", "1", "42"),
PrimitiveType.TIME_VALUE, List.of("1 msec", "2 sec"),
PrimitiveType.STRING, List.of("1", "\"foo\"", "bar"),
PrimitiveType.FILE, List.of("valid.file", "something.json", "\"foobar.proto\""))

Maps a type to a list of known good values.

◆ validator

ValidationTestHelper org.lflang.tests.compiler.LinguaFrancaValidationTest.validator
package

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/test/java/org/lflang/tests/compiler/LinguaFrancaValidationTest.java