summaryrefslogtreecommitdiff
path: root/cras/src/tests/checksum_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cras/src/tests/checksum_unittest.cc')
-rw-r--r--cras/src/tests/checksum_unittest.cc37
1 files changed, 0 insertions, 37 deletions
diff --git a/cras/src/tests/checksum_unittest.cc b/cras/src/tests/checksum_unittest.cc
deleted file mode 100644
index 4d54b2c2..00000000
--- a/cras/src/tests/checksum_unittest.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <gtest/gtest.h>
-
-#include "cras_checksum.h"
-#include "cras_util.h"
-
-namespace {
-
-struct TestCase {
- const char* input;
- uint32_t output;
-};
-
-static TestCase test_case[] = {
- /* The answers can be obtained by a command like "echo -n a | cksum" */
- {"", 4294967295U},
- {"a", 1220704766U},
- {"12345678901234567890", 970143720U},
-};
-
-TEST(ChecksumTest, All) {
- for (size_t i = 0; i < ARRAY_SIZE(test_case); i++) {
- const char* input = test_case[i].input;
- uint32_t output = test_case[i].output;
- EXPECT_EQ(output, crc32_checksum((unsigned char*)input, strlen(input)));
- }
-}
-
-} // namespace
-
-int main(int argc, char** argv) {
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}