~marcustomlinson/v8-cpp/test-gc

« back to all changes in this revision

Viewing changes to tests/members/test.cpp

  • Committer: Marcus Tomlinson
  • Date: 2015-07-08 09:29:21 UTC
  • Revision ID: marcus.tomlinson@canonical.com-20150708092921-i8sjb82198rc95fr
Cleaned up some memoery leaks and added valgrind.supp

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
TEST(Test, get_set_members_from_js)
29
29
{
30
 
    v8::Isolate* isolate = v8::Isolate::New();
31
 
 
32
 
    auto test_struct = v8cpp::run_script<TestStruct>(isolate,
 
30
    auto test_struct = v8cpp::run_script<TestStruct>(
33
31
    R"(
34
32
        var module = require("./test-members-module");
35
33
        var test_struct = new module.TestStruct();
58
56
    EXPECT_EQ(test_struct.int_value, -1);
59
57
    EXPECT_FLOAT_EQ(test_struct.float_value, -0.88);
60
58
    EXPECT_EQ(test_struct.string_value, "hello there");
61
 
 
62
 
    isolate->Dispose();
63
59
}