| 4 | |
| 5 | struct TestCBInfoSetData { |
| 6 | static void Test(napi_env env, napi_callback_info info) { |
| 7 | Napi::CallbackInfo cbInfo(env, info); |
| 8 | int valuePointer = 1220202; |
| 9 | cbInfo.SetData(&valuePointer); |
| 10 | |
| 11 | int* placeHolder = static_cast<int*>(cbInfo.Data()); |
| 12 | assert(*(placeHolder) == valuePointer); |
| 13 | assert(placeHolder == &valuePointer); |
| 14 | } |
| 15 | }; |
| 16 | |
| 17 | void TestCallbackInfoSetData(const Napi::CallbackInfo& info) { |