-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add Questionable Condition register #96
Conversation
Also add same line to new tests for parity.
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.
Thank you!
Please, can you fix the unit test. If you can't build unit tests with cunit, please read output of travis.
libscpi/test/test_parser.c
Outdated
@@ -439,6 +440,12 @@ static void testIEEE4882(void) { | |||
TEST_IEEE4882("STATus:QUEStionable:ENABle 2\r\n", ""); | |||
TEST_IEEE4882_REG(SCPI_REG_QUESE, 2); | |||
|
|||
EST_IEEE4882("STATus:QUEStionable:CONDition?\r\n", "0\r\n"); |
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.
You have typo in this line EST
-> TEST
. See travis build
libscpi/test/test_parser.c
Outdated
@@ -461,6 +462,7 @@ static void testIEEE4882(void) { | |||
TEST_IEEE4882("STATus:OPERation:CONDition?\r\n", "0\r\n"); | |||
TEST_IEEE4882_REG_SET(SCPI_REG_OPERC, 1); | |||
TEST_IEEE4882("STATus:OPERation:CONDition?\r\n", "1\r\n"); | |||
TEST_IEEE4882_REG(SCPI_REG_OPERC, 1); |
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.
TEST_IEEE4882
tests outer behavior of the library, so how it communicates
TEST_IEEE4882_REG
tests inner behavior of the library, so if the register has really the expected value.
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.
Yea, I understand. When I removed it I was thinking that this line was setting the register, but then I realized that it was actually verifying that the value didn't change after being read by the SCPI query.
libscpi/test/test_parser.c
Outdated
@@ -78,6 +78,7 @@ static const scpi_command_t scpi_commands[] = { | |||
{ .pattern = "SYSTem:VERSion?", .callback = SCPI_SystemVersionQ,}, | |||
|
|||
{ .pattern = "STATus:QUEStionable[:EVENt]?", .callback = SCPI_StatusQuestionableEventQ,}, | |||
{ .pattern = "STATus:QUEStionable:CONDition?", .callback = SCPI_Status_QuestionableConditionQ,}, |
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.
You have typo in function name SCPI_Status_QuestionableConditionQ
-> SCPI_StatusQuestionableConditionQ
. See travis build
For some reason I left out the Questionable Condition register in my previous PR, so here it is!