1 //===- llvm/unittest/Support/ModRefTest.cpp - ModRef tests ----------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Support/ModRef.h"
10 #include "llvm/ADT/SmallString.h"
11 #include "llvm/Support/raw_ostream.h"
12 #include "gtest/gtest.h"
19 // Verify that printing a MemoryEffects does not end with a ,.
20 TEST(ModRefTest
, PrintMemoryEffects
) {
22 raw_string_ostream
OS(S
);
23 OS
<< MemoryEffects::none();
24 EXPECT_EQ(S
, "ArgMem: NoModRef, InaccessibleMem: NoModRef, Other: NoModRef");