72 Commits

Author SHA1 Message Date
Daniel Aarno
cce3831403 Enable CMake to build (not test) in 1.2.
This is useful so we can at least check that it compiles on
Windows. We don't bother fixing the tests or testing infra (as has
been done in 1.4 branch) as we expect most development to happen
there. The CMake files will not be included in the distrubution and
are used for development/testing only.
2020-03-21 10:50:49 +00:00
Daniel Aarno
c51fb519d6 Merge branch '1.2' 2018-08-02 12:12:56 -07:00
Daniel Aarno
81bba06d20 Add emacs mode-lines to all test files 2018-03-19 10:12:25 +00:00
Daniel Aarno
ec3ddcfe41 IWYU: sstream
Explicitly include sstream in tets wherever it is used.
2017-12-26 15:40:35 +01:00
Daniel Aarno
d3ae484f7f IWYU: sstream
Explicitly include sstream in tets wherever it is used.
2017-12-23 16:50:07 +01:00
Daniel Aarno
4970b7e793 Check for NULL constraint and raise exception if found.
User is not allowed to provide a NULL constraint to the various ARG
constructors. This patch makes sure the Constraint is not NULL before
dereferencing and raises a logic_error if it is NULL.

Also included the two new tests test88 and test89 in runtests script.
2015-05-11 22:47:42 +02:00
Daniel Aarno
b162f59fcb Feature Request #8 Implicit Conversion Operators for SwitchArg and ValueArg. 2015-05-11 21:41:56 +02:00
Daniel Aarno
12cee38782 Added new test after merging traits branch. 2013-10-26 14:00:45 +02:00
Daniel Aarno
bd0440fdbd Merge branch 'traits'
Make all types have ValueLike traits by default.

This allows new types to be added without any fuzz (no need to specify
the traits) if it has operator>>. It also removes the need to manually
specify the ArgTrait for all built in types (such as long, bool, char,
float etc).

ArgTraits now works in the following way:

1) If there exists a specialization of ArgTraits for type X, use it.

2) If no specialization exists but X has the typename
X::ValueCategory, use the specialization for X::ValueCategory.

3) If neither (1) nor (2) defines the trait, use the default which is
ValueLike.

Conflicts:
	examples/Makefile.am
	examples/test24.cpp
	tests/Makefile.am
	tests/runtests.sh
	tests/test83.out
	tests/test83.sh
2013-10-26 13:56:31 +02:00
Daniel Aarno
3816281229 Actually test StringLikeTrait 2013-10-26 13:38:56 +02:00
Daniel Aarno
b60f3c14d1 Added tests for various Arg properties such as invalid flag/names and
DocBookOutput
2013-10-26 12:58:23 +02:00
Daniel Aarno
5d4ffbf2db Make all types have ValueLike traits by default.
This allows new types to be added without any fuzz (no need to specify
the traits) if it has operator>>. It also removes the need to manually
specify the ArgTrait for all built in types (such as long, bool, char,
float etc).

ArgTraits now works in the following way:

1) If there exists a specialization of ArgTraits for type X, use it.

2) If no specialization exists but X has the typename
X::ValueCategory, use the specialization for X::ValueCategory.

3) If neither (1) nor (2) defines the trait, use the default which is
ValueLike.
2013-05-18 15:02:30 +02:00
Mike Smoot
a910939b9a Added more unit tests and clarified difference to UnlabeledMultiArg. 2012-11-25 14:46:34 -08:00
Michael Smoot
f946bb210d added support for ignoring unmatched args 2011-04-17 15:04:28 -07:00
mes5k
3627d9402e updated changelog, news, docs, and added tests for flag and name defines 2011-04-16 22:31:18 +00:00
macbishop
234fe9c7ff Added explicit cast to supress warning about deprecated conversion from string constant to char* 2011-01-15 17:32:08 +00:00
mes5k
d6f5047688 added failing tests for XOR error message bug 2011-01-02 20:13:59 +00:00
mes5k
1ffebb2a33 applying patches to make gnu compiler args conditional, to install docs, and to add pkgconfig support to the installation 2009-08-22 19:26:17 +00:00
mes5k
352a838666 added support for parsing hex and octal ints as well as small fix to support gcc 4.4 2008-11-07 20:04:18 +00:00
zeekec
a15700d36d Rethrow ExitExceptions if we're not handling exceptions. 2008-08-19 22:18:47 +00:00
zeekec
3431fcfd78 Allow internal handling of parse errors to be turned off.
This allows exceptions for parse errors to be propagated to the caller.  Exiting
the program in parse is a bad idea generally, as we have no way of knowing what
cleanup needs to be done in the main program.
2008-07-21 17:20:57 +00:00
macbishop
bb477f8d10 Added test that tclap does not define any hard symbols (bug 1907017) 2008-05-21 21:21:56 +00:00
mes5k
cad795c4b8 tweaked tests to support dashes in arg names 2008-05-06 06:02:02 +00:00
macbishop
e021e21520 Refactoring of the arg-traits functionality. The purpose is to make it
easier to make you own classes, and types defined in the standard
library work well with tclap. I'll try to write up some documenation
of how to achieve this as-well.
2007-10-09 18:18:51 +00:00
mes5k
a560fc1b62 added attribution 2007-10-02 06:33:13 +00:00
mes5k
fd13a77ccc fixed a warning message 2007-10-02 06:30:44 +00:00
mes5k
1edfa65f88 a bug fix for parsing vectors of strings and making sure that combined switches dont get confused 2007-10-02 06:27:42 +00:00
macbishop
b4787eb4bd Suppress some warnings, compile with -Wextra by default 2007-09-01 08:17:24 +00:00
macbishop
00f07eb977 Use ArgTraits instead of ValueExtractor specialization Bug 1711487 2007-06-14 21:02:01 +00:00
macbishop
847b8c9478 Run CmdLine::parse with argv as pointer to const pointer to const char 2007-05-02 20:11:18 +00:00
mes5k
3e70af604d added patches for ZSH and DocBook output 2007-03-04 19:28:57 +00:00
macbishop
d2f767ddc7 Supressed warnings 2007-02-17 14:51:33 +00:00
mes5k
3718682c6d added exit() to failure method 2006-11-26 18:29:52 +00:00
mes5k
6652bf6577 SwitchArg interface change 2006-05-14 19:51:06 +00:00
zeekec
3c249e8847 Use local header files first instead of installed headers. 2006-02-22 02:15:14 +00:00
mes5k
14d1dc69bf added gcc warning patch 2005-09-10 23:25:43 +00:00
zeekec
f000413f39 Set INCLUDES to top_srcdir for out of source builds. 2005-07-13 03:36:46 +00:00
mes5k
7730bf0d62 Unlabeled changes 2005-06-03 02:33:49 +00:00
mes5k
01f898ae6f UnlabeledValueArg change 2005-01-24 03:03:39 +00:00
mes5k
4921db78a1 MultiSwitchArg 2005-01-24 00:27:29 +00:00
mes5k
7790b03c61 change for xor bug 2005-01-21 04:04:56 +00:00
mes5k
5ac97af617 changed for constraint 2005-01-07 04:05:39 +00:00
mes5k
667ba509b6 changed to constraint 2005-01-07 03:07:33 +00:00
mes5k
5e98e0c863 fixed output override bug 2005-01-05 18:28:09 +00:00
mes5k
a3830698d0 changed for long prog names bug 2005-01-04 21:16:18 +00:00
mes5k
1788e8e05a tweaked to support tests for '-' arg bug 2004-12-08 03:51:42 +00:00
mes5k
31ab3f37ec reflects new output handling 2004-11-05 05:07:52 +00:00
mes5k
3e2753528f changed test1 and now catching exceptions by ref 2004-10-22 01:01:47 +00:00
mes5k
46d749cfcc fixed includes 2004-10-21 22:50:12 +00:00
mes5k
54d1326da9 fixed a bizarre bug 2004-10-21 02:00:38 +00:00