Example #1
0
TEST_F(testsDataChunk, DefaultConstructor) {
    DataChunk empty;
    EXPECT_TRUE(empty.isReferencing(NULL));
    EXPECT_TRUE(empty.getData() == NULL);
    EXPECT_TRUE(empty.getSize() == 0);
    DataChunk emptyRef;
    emptyRef.reference(empty);
    EXPECT_TRUE(emptyRef.isReferencing(NULL));
    EXPECT_TRUE(emptyRef.getData() == NULL);
    EXPECT_TRUE(emptyRef.getSize() == 0);
    EXPECT_TRUE(emptyRef == empty);
}
Example #2
0
void wait_futures() {
    for (int i = 0; i < nbThreads; i++) {
        futures[i].wait();
        ASSERT_TRUE(sharedData.isReferencing(threadsBuffer));
        ASSERT_TRUE(futures[i].get() == sharedData.toInt());
    }
}