crc_16_unittest.cc 763 B

12345678910111213141516171819202122
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "media/base/crc_16.h"
  5. #include "testing/gtest/include/gtest/gtest.h"
  6. namespace media {
  7. TEST(Crc16Test, TestExpectedBUYPASS) {
  8. static_assert(0x0000 == crc16(""));
  9. static_assert(0x0186 == crc16("A"));
  10. static_assert(0xE04F == crc16("chromium"));
  11. static_assert(0x213B == crc16("One saturday morning at three"
  12. "A cheese-monger's shop in Paris"
  13. "collapsed to the ground"
  14. "with a thunderous sound"
  15. "leaving behind only de brie"));
  16. }
  17. } // namespace media