//===- unittest/DebugInfo/CodeView/GUIDFormatTest.cpp - GUID formatting ---===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/DebugInfo/CodeView/Formatters.h" #include "llvm/DebugInfo/CodeView/GUID.h" #include "llvm/Support/FormatVariadic.h" #include "gtest/gtest.h" usingnamespacellvm; usingnamespacellvm::codeview; // Variant 1 UUIDs, nowadays the most common variant, are encoded in a // big-endian format. // For example, 00112233-4455-6677-8899-aabbccddeeff is encoded as the bytes // 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff // // Variant 2 UUIDs, historically used in Microsoft's COM/OLE libraries, use a // mixed-endian format, whereby the first three components of the UUID are // little-endian, and the last two are big-endian. // For example, 00112233-4455-6677-8899-aabbccddeeff is encoded as the bytes // 33 22 11 00 55 44 77 66 88 99 aa bb cc dd ee ff. // // Note: Only Variant 2 UUIDs are tested. namespace { GuidPair; GuidData; void checkData(GuidData &Data) { … } TEST(GUIDFormatTest, ValidateFormat) { … } } // namespace