Avi Drissman | e4622aa | 2022-09-08 20:36:06 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors |
Chris Hamilton | 1288533 | 2019-05-24 19:46:58 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Daniel Cheng | ce364e5a | 2025-04-02 21:27:32 | [diff] [blame] | 5 | #include "ipc/tracing_helpers.h" |
Chris Hamilton | 1288533 | 2019-05-24 19:46:58 | [diff] [blame] | 6 | |
Daniel Cheng | ce364e5a | 2025-04-02 21:27:32 | [diff] [blame] | 7 | namespace ipc { |
Chris Hamilton | 1288533 | 2019-05-24 19:46:58 | [diff] [blame] | 8 | |
Chris Hamilton | 1288533 | 2019-05-24 19:46:58 | [diff] [blame] | 9 | // Ensure that everything works at compile-time by comparing to a few |
| 10 | // reference hashes. |
| 11 | constexpr char kMessage0[] = "message digest"; |
Chris Hamilton | 88808531 | 2019-05-30 00:53:30 | [diff] [blame] | 12 | |
Daniel Cheng | ce364e5a | 2025-04-02 21:27:32 | [diff] [blame] | 13 | static_assert(GetLegacyIpcTraceId(kMessage0) == 0xF96B697Dul, |
Chris Hamilton | 88808531 | 2019-05-30 00:53:30 | [diff] [blame] | 14 | "incorrect MD5Hash32 implementation"); |
Chris Hamilton | 1288533 | 2019-05-24 19:46:58 | [diff] [blame] | 15 | |
| 16 | constexpr char kMessage1[] = "The quick brown fox jumps over the lazy dog"; |
Chris Hamilton | 88808531 | 2019-05-30 00:53:30 | [diff] [blame] | 17 | |
Daniel Cheng | ce364e5a | 2025-04-02 21:27:32 | [diff] [blame] | 18 | static_assert(GetLegacyIpcTraceId(kMessage1) == 0x9E107D9Dul, |
Chris Hamilton | 88808531 | 2019-05-30 00:53:30 | [diff] [blame] | 19 | "incorrect MD5Hash32 implementation"); |
Chris Hamilton | 1288533 | 2019-05-24 19:46:58 | [diff] [blame] | 20 | |
Daniel Cheng | ce364e5a | 2025-04-02 21:27:32 | [diff] [blame] | 21 | } // namespace ipc |