diff options
Diffstat (limited to 'unittests/Interpreter/TestArgs.cpp')
-rw-r--r-- | unittests/Interpreter/TestArgs.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Interpreter/TestArgs.cpp b/unittests/Interpreter/TestArgs.cpp index 9dcf09d54aea..2aeed0f542b1 100644 --- a/unittests/Interpreter/TestArgs.cpp +++ b/unittests/Interpreter/TestArgs.cpp @@ -169,6 +169,14 @@ TEST(ArgsTest, AppendArguments) { EXPECT_STREQ("4", args.GetArgumentAtIndex(3)); } +TEST(ArgsTest, GetArgumentArrayRef) { + Args args("foo bar"); + auto ref = args.GetArgumentArrayRef(); + ASSERT_EQ(2u, ref.size()); + EXPECT_STREQ("foo", ref[0]); + EXPECT_STREQ("bar", ref[1]); +} + TEST(ArgsTest, StringToBoolean) { bool success = false; EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("true"), false, nullptr)); |