OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/logging.h" | 5 #include "base/basictypes.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "third_party/bzip2/bzlib.h" | 7 #include "third_party/bzip2/bzlib.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 class Bzip2Test : public testing::Test { | 10 class Bzip2Test : public testing::Test { |
11 }; | 11 }; |
12 }; | 12 }; |
13 | 13 |
14 // This test does a simple round trip to test that the bzip2 library is | 14 // This test does a simple round trip to test that the bzip2 library is |
15 // present and working. | 15 // present and working. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 do { | 58 do { |
59 result = BZ2_bzDecompress(&stream); | 59 result = BZ2_bzDecompress(&stream); |
60 } while (result == BZ_OK); | 60 } while (result == BZ_OK); |
61 ASSERT_EQ(result, BZ_STREAM_END); | 61 ASSERT_EQ(result, BZ_STREAM_END); |
62 result = BZ2_bzDecompressEnd(&stream); | 62 result = BZ2_bzDecompressEnd(&stream); |
63 ASSERT_EQ(result, BZ_OK); | 63 ASSERT_EQ(result, BZ_OK); |
64 | 64 |
65 EXPECT_EQ(arraysize(input) - 1, stream.total_out_lo32); | 65 EXPECT_EQ(arraysize(input) - 1, stream.total_out_lo32); |
66 EXPECT_STREQ(input, output2); | 66 EXPECT_STREQ(input, output2); |
67 } | 67 } |
OLD | NEW |