[C++] Add unit test for native_type usage

This commit is contained in:
Alexey Geraskin
2019-07-16 18:20:21 +03:00
parent 8525b984ce
commit 0a4bf1d6d3
7 changed files with 93 additions and 0 deletions

13
tests/vector3d_pack.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include "vector3d_pack.h"
#include "native_type_test_generated.h"
namespace flatbuffers {
Geometry::Vector3D Pack(const Native::Vector3D& obj) {
return Geometry::Vector3D(obj.x, obj.y, obj.z);
}
const Native::Vector3D UnPack(const Geometry::Vector3D& obj) {
return Native::Vector3D(obj.x(), obj.y(), obj.z());
}
}