summaryrefslogtreecommitdiff
path: root/chromium/media/base/crc_16_unittest.cc
blob: 1149ff980010cc209788014200b5521dad5ea70f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2022 The Chromium 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 "media/base/crc_16.h"

#include "testing/gtest/include/gtest/gtest.h"

namespace media {

TEST(Crc16Test, TestExpectedBUYPASS) {
  static_assert(0x0000 == crc16(""));
  static_assert(0x0186 == crc16("A"));
  static_assert(0xE04F == crc16("chromium"));
  static_assert(0x213B == crc16("One saturday morning at three"
                                "A cheese-monger's shop in Paris"
                                "collapsed to the ground"
                                "with a thunderous sound"
                                "leaving behind only de brie"));
}

}  // namespace media