-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to binary and string variables #50
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,7 +321,7 @@ TEST_CASE("Invalid Binary variable - non-hexadecimal char first in byte tuple", | |
const char* xmldir = FMI3_TEST_XML_DIR "/variable_test/invalid/binaryStart1"; | ||
|
||
fmi3_import_t* xml = fmi3_testutil_parse_xml(xmldir); | ||
REQUIRE(xml != nullptr); | ||
REQUIRE(xml != nullptr); /* TODO how do we want this to work? */ | ||
|
||
const char* errMsg = fmi3_import_get_last_error(xml); | ||
REQUIRE(strcmp(errMsg, "String is not hexadecimal: gf") == 0); | ||
|
@@ -332,7 +332,7 @@ TEST_CASE("Invalid Binary variable - non-hexadecimal char second in byte tuple", | |
const char* xmldir = FMI3_TEST_XML_DIR "/variable_test/invalid/binaryStart2"; | ||
|
||
fmi3_import_t* xml = fmi3_testutil_parse_xml(xmldir); | ||
REQUIRE(xml != nullptr); | ||
REQUIRE(xml != nullptr); /* TODO how do we want this to work? */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only remaining action is to figure out how we want to handle this scenario, currently the tests fail on this branch, but the tests only fail here. |
||
|
||
const char* errMsg = fmi3_import_get_last_error(xml); | ||
REQUIRE(strcmp(errMsg, "String is not hexadecimal: FG") == 0); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
<CoSimulation modelIdentifier="VariableTypes"/> | ||
<ModelVariables> | ||
<Binary name="binary_array" valueReference="122" maxSize="28" initial="exact" description="Testing binary arrays"> | ||
<Binary name="binary_array" valueReference="125" maxSize="28" initial="exact" description="Testing binary arrays"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 125 was an arbitrary change I did to simplify debugging (since there are other tests with vr 122) |
||
<Dimension start="3"/> | ||
<Start value="0011BBff029eE4Cd"/> | ||
<Start value="3c3f"/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only remaining action is to figure out how we want to handle this scenario, currently the tests fail on this branch, but the tests only fail here.