示例#1
0
TEST_F(TableTests, test_modifiable_table) {
  TableGenerator t;
  hyrise::storage::atable_ptr_t a = t.create_empty_table_modifiable(10, 2);
  a->setValue<hyrise_int_t>(0, 0, 100);
  a->setValue<hyrise_int_t>(0, 1, 200);
  ASSERT_EQ(a->getValue<hyrise_int_t>(0, 0), 100);
  ASSERT_EQ(a->getValue<hyrise_int_t>(0, 1), 200);
}
示例#2
0
TEST_F(TableTests, test_table_copy) {
  TableGenerator t;
  hyrise::storage::atable_ptr_t a = t.create_empty_table_modifiable(10, 2);
  a->setValue<hyrise_int_t>(0, 0, 100);
  a->setValue<hyrise_int_t>(0, 1, 200);

  hyrise::storage::atable_ptr_t b = a->copy();
  b->setValue<hyrise_int_t>(0, 0, 50);
  b->setValue<hyrise_int_t>(0, 1, 100);
}