On 2018-01-31 20:59 +0000, Philip Schuchardt wrote:
> Nice! I wonder if i386 don’t support exceptions properly or something...

It's not that simple.

I found out how to run specific tests with catch. There are two other groups of 
tests which are expected to throw and those work OK:
(sid_i386-dchroot)wookey@barriere:~/dewalls-1.0.0+ds1$ 
qbs-build/dewalls-test.a3cdf9ea/dewalls-test -f test/azimuthparsingtests.cpp 
azimuth* -c "misc invalid values throw"
===============================================================================
All tests passed (6 assertions in 1 test case)

(sid_i386-dchroot)wookey@barriere:~/dewalls-1.0.0+ds1$ 
qbs-build/dewalls-test.a3cdf9ea/dewalls-test -f test/azimuthparsingtests.cpp 
azimuth* -c "negative numbers throw for azimuth"
===============================================================================
All tests passed (1 assertion in 1 test case)

But the 'out of range values throw' tests fail:
(sid_i386-dchroot)wookey@barriere:~/dewalls-1.0.0+ds1$ 
qbs-build/dewalls-test.a3cdf9ea/dewalls-test -f test/azimuthparsingtests.cpp 
azimuth* -c "out of range values throw"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dewalls-test is a Catch v1.10.0 host application.
Run with -? for options            

-------------------------------------------------------------------------------
azimuth parsing tests
  out of range values throw
-------------------------------------------------------------------------------
/home/wookey/dewalls-1.0.0+ds1/test/azimuthparsingtests.cpp:63
...............................................................................

/home/wookey/dewalls-1.0.0+ds1/test/azimuthparsingtests.cpp:64: FAILED:
  CHECK_THROWS( WallsSurveyParser("360").azimuth(Angle::Degrees) )
because no exception was thrown where one was expected:

/home/wookey/dewalls-1.0.0+ds1/test/azimuthparsingtests.cpp:66: FAILED:
  CHECK_THROWS( WallsSurveyParser("400g").azimuth(Angle::Degrees) )
because no exception was thrown where one was expected:

/home/wookey/dewalls-1.0.0+ds1/test/azimuthparsingtests.cpp:68: FAILED:
  CHECK_THROWS( WallsSurveyParser("N90E").azimuth(Angle::Degrees) )
because no exception was thrown where one was expected:

/home/wookey/dewalls-1.0.0+ds1/test/azimuthparsingtests.cpp:69: FAILED:
  CHECK_THROWS( WallsSurveyParser("N100gE").azimuth(Angle::Degrees) )
because no exception was thrown where one was expected:

===============================================================================
test cases: 1 | 1 failed
assertions: 6 | 2 passed | 4 failed


I'm not sure what to make of this, but it suggests that the issue is
more likely to be not with catch itself, but with the actual parser.

How can I test the parser directly, to eliminate catch as part of the issue?

Can one of you knock up a little test case that tries to read in a
file containing these sorts of error, that can be built against
libdewalls? Then we can see whether the library is actually getting
this wrong or if it's only in the test framework.

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to