MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST_F

Function TEST_F

tensorflow/core/lib/db/sqlite_test.cc:42–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40};
41
42TEST_F(SqliteTest, InsertAndSelectInt) {
43 auto stmt = db_->PrepareOrDie("INSERT INTO T (a, b) VALUES (?, ?)");
44 stmt.BindInt(1, 3);
45 stmt.BindInt(2, -7);
46 TF_ASSERT_OK(stmt.StepAndReset());
47 stmt.BindInt(1, 123);
48 stmt.BindInt(2, -123);
49 TF_ASSERT_OK(stmt.StepAndReset());
50 stmt = db_->PrepareOrDie("SELECT a, b FROM T ORDER BY b");
51 TF_ASSERT_OK(stmt.Step(&is_done_));
52 ASSERT_FALSE(is_done_);
53 EXPECT_EQ(123, stmt.ColumnInt(0));
54 EXPECT_EQ(-123, stmt.ColumnInt(1));
55 TF_ASSERT_OK(stmt.Step(&is_done_));
56 ASSERT_FALSE(is_done_);
57 EXPECT_EQ(3, stmt.ColumnInt(0));
58 EXPECT_EQ(-7, stmt.ColumnInt(1));
59 TF_ASSERT_OK(stmt.Step(&is_done_));
60 ASSERT_TRUE(is_done_);
61}
62
63TEST_F(SqliteTest, InsertAndSelectDouble) {
64 auto stmt = db_->PrepareOrDie("INSERT INTO T (a, b) VALUES (?, ?)");

Callers

nothing calls this directly

Calls 15

PrepareOrDieMethod · 0.80
BindIntMethod · 0.80
StepAndResetMethod · 0.80
ColumnIntMethod · 0.80
BindDoubleMethod · 0.80
ColumnDoubleMethod · 0.80
BindTextMethod · 0.80
BindBlobMethod · 0.80
ColumnSizeMethod · 0.80
ColumnTypeMethod · 0.80
BindBlobUnsafeMethod · 0.80
BindTextUnsafeMethod · 0.80

Tested by

no test coverage detected