Debian Codegraph @

llvm/unittests/Support/ModRefTest.cpp

raw
1 //===- llvm/unittest/Support/ModRefTest.cpp - ModRef tests ----------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "llvm/Support/ModRef.h"
10 #include "llvm/Support/raw_ostream.h"
11 #include "gtest/gtest.h"
12 #include <string>
13
14 using namespace llvm;
15
16 namespace {
17
18 // Verify that printing a MemoryEffects does not end with a ,.
19 TEST(ModRefTest, PrintMemoryEffects) {
20 std::string S;
21 raw_string_ostream OS(S);
22 OS << MemoryEffects::none();
23 EXPECT_EQ(S, "ArgMem: NoModRef, InaccessibleMem: NoModRef, ErrnoMem: "
24 "NoModRef, Other: NoModRef");
25 }
26
27 } // namespace