Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gflags
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
gflags
Commits
7bc160b3
Commit
7bc160b3
authored
Mar 30, 2014
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'google/develop' into release
parents
9a257c0b
dc8543a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
CMakeLists.txt
test/CMakeLists.txt
+7
-0
gflags_declare_flags.cc
test/gflags_declare_flags.cc
+9
-0
gflags_declare_test.cc
test/gflags_declare_test.cc
+12
-0
No files found.
test/CMakeLists.txt
View file @
7bc160b3
...
...
@@ -154,6 +154,13 @@ add_gflags_test(always_fail 1 "ERROR: failed validation of new value 'true' for
# debugger abort() intervention in case of Debug configuration.
#add_gflags_test(deadlock_if_cant_lock 0 "PASS" "" gflags_unittest --deadlock_if_cant_lock)
# ----------------------------------------------------------------------------
# use gflags_declare.h
add_executable
(
gflags_declare_test gflags_declare_test.cc gflags_declare_flags.cc
)
add_test
(
NAME gflags_declare COMMAND gflags_declare_test --message
"Hello gflags!"
)
set_tests_properties
(
gflags_declare PROPERTIES PASS_REGULAR_EXPRESSION
"Hello gflags!"
)
# ----------------------------------------------------------------------------
# (negative) compilation tests
if
(
BUILD_NC_TESTS
)
...
...
test/gflags_declare_flags.cc
0 → 100644
View file @
7bc160b3
#include <iostream>
#include <gflags/gflags_declare.h>
DECLARE_string
(
message
);
// in gflags_delcare_test.cc
void
print_message
()
{
std
::
cout
<<
FLAGS_message
<<
std
::
endl
;
}
test/gflags_declare_test.cc
0 → 100644
View file @
7bc160b3
#include <gflags/gflags.h>
DEFINE_string
(
message
,
""
,
"The message to print"
);
void
print_message
();
// in gflags_declare_flags.cc
int
main
(
int
argc
,
char
**
argv
)
{
gflags
::
SetUsageMessage
(
"Test compilation and use of gflags_declare.h"
);
gflags
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
print_message
();
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment