Lines Matching refs:calc
53 HashCalculator calc; in TEST_F() local
54 calc.Update("hi", 2); in TEST_F()
55 calc.Finalize(); in TEST_F()
56 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
59 EXPECT_TRUE(raw_hash == calc.raw_hash()); in TEST_F()
63 HashCalculator calc; in TEST_F() local
64 calc.Update("h", 1); in TEST_F()
65 calc.Update("i", 1); in TEST_F()
66 calc.Finalize(); in TEST_F()
67 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
70 EXPECT_TRUE(raw_hash == calc.raw_hash()); in TEST_F()
74 HashCalculator calc; in TEST_F() local
75 calc.Update("h", 1); in TEST_F()
76 string calc_context = calc.GetContext(); in TEST_F()
77 calc.Finalize(); in TEST_F()
89 HashCalculator calc; in TEST_F() local
100 calc.Update(buf, strlen(buf)); in TEST_F()
102 calc.Finalize(); in TEST_F()
110 EXPECT_EQ("NZf8k6SPBkYMvhaX8YgzuMgbkLP1XZ+neM8K5wcSsf8=", calc.hash()); in TEST_F()
122 HashCalculator calc; in TEST_F() local
123 EXPECT_EQ(2, calc.UpdateFile(data_path, kLengths[i])); in TEST_F()
124 EXPECT_TRUE(calc.Finalize()); in TEST_F()
125 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
128 EXPECT_TRUE(raw_hash == calc.raw_hash()); in TEST_F()
131 HashCalculator calc; in TEST_F() local
132 EXPECT_EQ(0, calc.UpdateFile(data_path, 0)); in TEST_F()
133 EXPECT_EQ(1, calc.UpdateFile(data_path, 1)); in TEST_F()
134 EXPECT_TRUE(calc.Finalize()); in TEST_F()
136 EXPECT_EQ("qqlAJmTxpB9A67xSyZk+tmrrNmYClY/fqig7ceZNsSM=", calc.hash()); in TEST_F()
159 HashCalculator calc; in TEST_F() local
160 EXPECT_EQ(-1, calc.UpdateFile("/some/non-existent/file", -1)); in TEST_F()
166 HashCalculator calc; in TEST_F() local
169 HashCalculator calc; in TEST_F() local
170 calc.Update("h", 1); in TEST_F()