blob: 1ff8dffb68feeea36371050f785d6cdcb84717ef [file] [log] [blame]
Avi Drissmane4622aa2022-09-08 20:36:061// Copyright 2019 The Chromium Authors
Chris Hamilton12885332019-05-24 19:46:582// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Daniel Chengce364e5a2025-04-02 21:27:325#include "ipc/tracing_helpers.h"
Chris Hamilton12885332019-05-24 19:46:586
Daniel Chengce364e5a2025-04-02 21:27:327namespace ipc {
Chris Hamilton12885332019-05-24 19:46:588
Chris Hamilton12885332019-05-24 19:46:589// Ensure that everything works at compile-time by comparing to a few
10// reference hashes.
11constexpr char kMessage0[] = "message digest";
Chris Hamilton888085312019-05-30 00:53:3012
Daniel Chengce364e5a2025-04-02 21:27:3213static_assert(GetLegacyIpcTraceId(kMessage0) == 0xF96B697Dul,
Chris Hamilton888085312019-05-30 00:53:3014 "incorrect MD5Hash32 implementation");
Chris Hamilton12885332019-05-24 19:46:5815
16constexpr char kMessage1[] = "The quick brown fox jumps over the lazy dog";
Chris Hamilton888085312019-05-30 00:53:3017
Daniel Chengce364e5a2025-04-02 21:27:3218static_assert(GetLegacyIpcTraceId(kMessage1) == 0x9E107D9Dul,
Chris Hamilton888085312019-05-30 00:53:3019 "incorrect MD5Hash32 implementation");
Chris Hamilton12885332019-05-24 19:46:5820
Daniel Chengce364e5a2025-04-02 21:27:3221} // namespace ipc