a bunch of updates. to be checked on durian. does not build.
[jacinto-ai/caffe-jacinto.git] / src / caffeine / test_syncedmem.cpp
1 #include "gtest/gtest.h"
2 #include "caffeine/syncedmem.hpp"
4 namespace caffeine {
6 class SyncedMemoryTest : public ::testing::Test {};
8 TEST_F(SyncedMemoryTest, TestInitialization) {
9   SyncedMemory mem(10);
10   EXPECT_EQ(mem.head(), SyncedMemory::UNINITIALIZED);
11 }
13 TEST_F(SyncedMemoryTest, TestAllocation) {
14   SyncedMemory mem(10);
15   EXPECT_NE(mem.cpu_data(), (void*)NULL);
16   EXPECT_NE(mem.gpu_data(), (void*)NULL);
17 }
19 }
21 int main(int argc, char** argv) {
22   ::testing::InitGoogleTest(&argc, argv);
23   return RUN_ALL_TESTS();
24 }