-
Notifications
You must be signed in to change notification settings - Fork 17
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
Write a test for enum type using jest. #122
Conversation
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.
lgtm
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.
I left some minor comments!
test/test_interface.idl
Outdated
@@ -32,4 +32,13 @@ interface TestInterface { | |||
short shortMethod(short number); | |||
double doubleMethod(double number); | |||
string stringMethod(string string); | |||
|
|||
// enum | |||
void EnumMethod(TestEnum enumValue); |
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.
nit: Should be enumMethod(...) in IDL.
Also, I think better name is voidMethodTestEnumArg(...)
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.
i fixed it.
test/test_interface.cc
Outdated
@@ -64,3 +64,7 @@ double TestInterface::DoubleMethod(double number) { | |||
const std::string TestInterface::StringMethod(const std::string& string) { | |||
return string; | |||
} | |||
|
|||
void TestInterface::EnumMethod(const std::string& string) { | |||
last_call_info_ = "EnumMethod(" + string + ")"; |
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.
The string should be IDL definition like other methods.
"void voidMethodTestEnumArg(TestEnum)";
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.
i fixed it.
Write a test for enum type using jest.
ISSUE=#99,#100