argparse/test
Zhihao Yuan 964790cf3c
Determine negative numeric values with a grammar
Two differences that diverge from the existing behavior:

  1. Leading zeros are not allowed for integers.  Negative
     octal numbers such as `-066` are not meant to be treated
     as positional arguments, but existing code recognize them
     as decimal numbers.  Note that negative floating-point
     numbers with leading zeros (`-003.`) are unambiguous and
     are recognized.
  2. Inf and NaN are not recognized.  This is because options
     like `-inf` is indistinguishable from a compound argument
     that meant to be a shorthand for `-i -n -f`.

fixes: p-ranav/argparse#55
2019-11-24 00:31:05 -06:00
..
.gitignore Renamed directories 2019-04-01 22:01:40 -04:00
CMakeLists.txt Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
doctest.hpp Closes #53 2019-11-21 09:08:49 -06:00
main.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
README.md Update README.md 2019-04-01 22:03:59 -04:00
test_actions.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_compound_arguments.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_container_arguments.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_help.cpp Default --help to print help and exit 2019-11-22 16:54:58 -06:00
test_invalid_arguments.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_issue_37.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_negative_numbers.cpp Determine negative numeric values with a grammar 2019-11-24 00:31:05 -06:00
test_optional_arguments.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_parent_parsers.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_parse_args.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_positional_arguments.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_required_arguments.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00
test_utility.hpp Unify container operations 2019-05-12 17:17:21 +02:00
test_value_semantics.cpp Annotate test cases with doctest::test_suite 2019-11-21 14:24:50 -06:00

Argparse Tests

Linux

$ mkdir build
$ cd build
$ cmake ../.
$ make
$ ./tests

Windows

  1. Generate Visual Studio solution
$ mkdir build
$ cd build
$ cmake ../. -G "Visual Studio 15 2017"
  1. Open ARGPARSE.sln
  2. Build tests in RELEASE | x64
  3. Run tests.exe