Skip to content

Commit

Permalink
add extra data members in test classes (#200)
Browse files Browse the repository at this point in the history
... to prevent debug checks in `v8::External::New()` with nullptr values.
They are fine as pointers to data members when used in `v8pp::var_()`
  • Loading branch information
pmed authored Oct 17, 2023
1 parent 555d4ce commit c0c93bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

struct Xbase
{
char c = 'X';
int var = 1;

int get() const { return var; }
Expand Down Expand Up @@ -342,6 +343,7 @@ void test_multiple_inheritance()
{
struct A
{
char a = 'A';
int x;
A() : x(1) {}
int f() { return x; }
Expand All @@ -352,6 +354,7 @@ void test_multiple_inheritance()

struct B
{
char b = 'B';
int x;
B() : x(2) {}
int g() { return x; }
Expand Down

0 comments on commit c0c93bd

Please sign in to comment.