projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a test for llvm-ar's 'd' operation.
[oota-llvm.git]
/
unittests
/
Option
/
OptionParsingTest.cpp
diff --git
a/unittests/Option/OptionParsingTest.cpp
b/unittests/Option/OptionParsingTest.cpp
index 10e4be8dc13e568c6324d7dc95e2f5d082d64407..30944d9be797657700208e623982666f6853fdda 100644
(file)
--- a/
unittests/Option/OptionParsingTest.cpp
+++ b/
unittests/Option/OptionParsingTest.cpp
@@
-7,10
+7,10
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/OwningPtr.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
-
#include "gtest/gtest.h"
using namespace llvm;
#include "gtest/gtest.h"
using namespace llvm;
@@
-61,8
+61,12
@@
const char *Args[] = {
TEST(Support, OptionParsing) {
TestOptTable T;
unsigned MAI, MAC;
TEST(Support, OptionParsing) {
TestOptTable T;
unsigned MAI, MAC;
- InputArgList *AL = T.ParseArgs(Args, Args + (sizeof(Args) / sizeof(Args[0])), MAI, MAC);
-
+ OwningPtr<InputArgList>
+ AL(T.ParseArgs(Args,
+ Args + (sizeof(Args) / sizeof(Args[0])),
+ MAI,
+ MAC));
+
// Check they all exist.
EXPECT_TRUE(AL->hasArg(OPT_A));
EXPECT_TRUE(AL->hasArg(OPT_B));
// Check they all exist.
EXPECT_TRUE(AL->hasArg(OPT_A));
EXPECT_TRUE(AL->hasArg(OPT_B));