Setup test infra into mapBuffer project

Summary:
Setup test infra into mapBuffer project

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25733949

fbshipit-source-id: bcfc89d87e28dc5a6ed28bc6b56893aa6f191e71
This commit is contained in:
David Vacca
2021-01-01 15:45:06 -08:00
committed by Facebook GitHub Bot
parent b9ad5a706d
commit 89beefaefb
4 changed files with 16 additions and 3 deletions
+2 -1
View File
@@ -22,7 +22,7 @@ rn_xplat_cxx_library(
[
("", "*.h"),
],
prefix = "react",
prefix = "react/renderer/mapbuffer",
),
compiler_flags = [
"-fexceptions",
@@ -63,5 +63,6 @@ fb_xplat_cxx_test(
deps = [
"//xplat/folly:molly",
"//xplat/third-party/gmock:gtest",
react_native_xplat_target("react/renderer/mapbuffer:mapbuffer"),
],
)
@@ -14,5 +14,9 @@ MapBuffer::MapBuffer() {}
MapBuffer::~MapBuffer() {}
int MapBuffer::getSize() {
return 0;
}
} // namespace react
} // namespace facebook
@@ -31,6 +31,8 @@ class MapBuffer {
public:
MapBuffer();
virtual ~MapBuffer();
int getSize();
};
} // namespace react
@@ -7,8 +7,14 @@
#include <memory>
#include <assert.h>
#include <gtest/gtest.h>
#include <react/renderer/mapbuffer/MapBuffer.h>
TEST(MapBufferTest, testSomething) {
// TODO
using namespace facebook::react;
// Dummy test to create setup of tests
TEST(MapBufferTest, testMapCreation) {
auto buffer = MapBuffer();
assert(buffer.getSize() == 0);
}