Skip to content

Commit

Permalink
Added tests for error operator and fixed indentation in lang/en_us.json
Browse files Browse the repository at this point in the history
  • Loading branch information
kirjorjos committed Dec 14, 2024
1 parent 863a290 commit 0d84dfe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/assets/integrateddynamics/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1060,8 +1060,8 @@
"operator.integrateddynamics.string.name.info": "Get the string or name of a named object or converts it to a string",
"operator.integrateddynamics.string.unique_name": "Unique Name",
"operator.integrateddynamics.string.unique_name.info": "Get the unique name of an object",
"operator.integrateddynamics.string.string_error": "Error",
"operator.integrateddynamics.string.string_error.info": "Throw a custom error",
"operator.integrateddynamics.string.string_error": "Error",
"operator.integrateddynamics.string.string_error.info": "Throw a custom error",

"operator.integrateddynamics.double": "Double",
"operator.integrateddynamics.double.basename": "Double %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,4 +780,18 @@ public void testInvalidInputTypeNamedName() throws EvaluationException {
Operators.NAMED_NAME.evaluate(new IVariable[]{DUMMY_VARIABLE});
}

/**
* ----------------------------------- STRING_ERROR -----------------------------------
*/

@Test(expected = EvaluationException.class)
public void testSymbolsError() throws EvaluationException {
Operators.STRING_ERROR.evaluate(sregex);
}

@Test(expected = EvaluationException.class)
public void testSpacesError() throws EvaluationException {
Operators.STRING_ERROR.evaluate(shelloWorld);
}

}

0 comments on commit 0d84dfe

Please sign in to comment.