#include "gin/wrappable.h"
#include "base/check.h"
#include "gin/arguments.h"
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "gin/per_isolate_data.h"
#include "gin/public/isolate_holder.h"
#include "gin/test/v8_test.h"
#include "gin/try_catch.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-message.h"
#include "v8/include/v8-script.h"
namespace gin {
namespace {
void NonMemberMethod() { … }
class BaseClass { … };
class MyObject : public BaseClass,
public Wrappable<MyObject> { … };
class MyObject2 : public Wrappable<MyObject2> { … };
class MyNamedObject : public Wrappable<MyNamedObject> { … };
WrapperInfo MyObject::kWrapperInfo = …;
WrapperInfo MyObject2::kWrapperInfo = …;
WrapperInfo MyNamedObject::kWrapperInfo = …;
}
WrappableTest;
TEST_F(WrappableTest, WrapAndUnwrap) { … }
TEST_F(WrappableTest, UnwrapFailures) { … }
TEST_F(WrappableTest, GetAndSetProperty) { … }
TEST_F(WrappableTest, MethodInvocationErrorsOnUnnamedObject) { … }
TEST_F(WrappableTest, MethodInvocationErrorsOnNamedObject) { … }
class MyObjectWithLazyProperties
: public Wrappable<MyObjectWithLazyProperties> { … };
WrapperInfo MyObjectWithLazyProperties::kWrapperInfo = …;
TEST_F(WrappableTest, LazyPropertyGetterIsCalledOnce) { … }
TEST_F(WrappableTest, LazyPropertyGetterCanBeSetFirst) { … }
TEST_F(WrappableTest, LazyPropertyGetterCanBindSpecialArguments) { … }
TEST_F(WrappableTest, CannotConstruct) { … }
}