-
Notifications
You must be signed in to change notification settings - Fork 19
Fixes required for targeting wasm32 #199
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
Conversation
| #ifndef __EMSCRIPTEN__ | ||
| EXPECT_THAT(Scope("bf").Eval("a"), IsEqual("1023")); | ||
| EXPECT_THAT(Scope("bf").Eval("b"), IsEqual("9")); | ||
| EXPECT_THAT(Scope("bf").Eval("c"), IsEqual("false")); | ||
| EXPECT_THAT(Scope("bf").Eval("d"), IsEqual("true")); | ||
| #endif |
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.
What's wrong with these? Is scoped evaluation not supported for wasm32?
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.
Yes, exactly.
| #ifndef __EMSCRIPTEN__ | ||
| TEST_F(EvalTest, TestDereferencedType) { |
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.
What's wrong with this test? It seems to me this should work for wasm32 too...
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.
It's the unconditional comparison with lldb's output here. wasm32 can't run lldb, so we can't do this comparison.
| #ifndef __EMSCRIPTEN__ | ||
| TEST_F(EvalTest, TestCompositeAssignmentAdd) { |
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.
Have you considered doing something like this when disabling the whole test?
#ifdef __EMSCRIPTEN__
// Doesn't work on wasm32 because of X
GTEST_SKIP() << "not supported on wasm32";
#else
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 did, but ifdef'ing out the entire test simplifies the wasm wrapper, so that it doesn't have to provide noop implementations of things like EvalWithContext() or Scope(). This seemed cleaner than implementing methods that aren't supposed to be called.
Drive-by: Fix pointer comparison on 32bit targets