| Index: omaha_hash_calculator_unittest.cc
|
| diff --git a/omaha_hash_calculator_unittest.cc b/omaha_hash_calculator_unittest.cc
|
| index 449cb9021e487a728c1a07a5b7e5f72992cb6743..597b21f4d74638b2992d3f21e94a824ad7602250 100644
|
| --- a/omaha_hash_calculator_unittest.cc
|
| +++ b/omaha_hash_calculator_unittest.cc
|
| @@ -51,6 +51,18 @@ TEST(OmahaHashCalculatorTest, MultiUpdateTest) {
|
| EXPECT_TRUE(raw_hash == calc.raw_hash());
|
| }
|
|
|
| +TEST(OmahaHashCalculatorTest, ContextTest) {
|
| + OmahaHashCalculator calc;
|
| + calc.Update("h", 1);
|
| + OmahaHashCalculator calc_next;
|
| + calc_next.SetContext(calc.GetContext());
|
| + calc_next.Update("i", 1);
|
| + calc_next.Finalize();
|
| + // Generated by running this on a linux shell:
|
| + // $ echo -n hi | openssl dgst -sha256 -binary | openssl base64
|
| + EXPECT_EQ("j0NDRmSPa5bfid2pAcUXaxCm2Dlh3TwayItZstwyeqQ=", calc_next.hash());
|
| +}
|
| +
|
| TEST(OmahaHashCalculatorTest, BigTest) {
|
| OmahaHashCalculator calc;
|
|
|
|
|