Commit Graph

4736 Commits

Author SHA1 Message Date
Florent Rougon
b4178ae888 Test macros: be more rigorous and consistent
- Because of possible operator overloading, make SG_CHECK_EQUAL(a, b)
  fail if, and only if (a) == (b) is false (testing if (a) != (b) for
  this macro is not correct in general).

- For clarity and consistency, change the messages printed when some
  tests fail: SG_VERIFY(some_test) prints 'failed: some_test' (okay),
  but SG_CHECK_EQUAL(a, b) used to print 'failed: a != b', which is
  inconsistent. Instead, print: 'failed: a == b' because this is what we
  know that failed (again, because of possible operator overloading,
  pretending we know the the logical value of (a != b) after testing
  (a == b) is not correct in general.

  Similarly, the "approximate equality tests" SG_CHECK_EQUAL_EP() and
  SG_CHECK_EQUAL_EP2() now print something like 'failed: a ~= b' when
  they fail, instead of 'failed with epsilon: a != b'.
2016-12-04 21:09:39 +01:00
Florent Rougon
ab4814c916 simgear/misc/test_macros.hxx: add missing <iostream> header + minor changes
- The header is needed for std::cerr.
- Also improve the messages when tests fail (spacing, and in some cases
  an argument was missing).
- Reorder the macros a tiny bit.
2016-12-04 21:09:39 +01:00
Florent Rougon
6b16f96c8a Test macros: use defensive parentheses and std::fabs() for SG_CHECK_EQUAL_EP*
Some of the modules where I previously removed duplicate private
definitions of these macros had these features, and since they seem wise
to me, I'm applying them to the canonical SG_CHECK_EQUAL_EP() and
SG_CHECK_EQUAL_EP2() macros defined in simgear/misc/test_macros.hxx.
2016-12-04 21:09:39 +01:00
Florent Rougon
e655d41817 Rename the COMPARE, COMPARE_EP, COMPARE_EP2 and VERIFY test macros
COMPARE     -> SG_CHECK_EQUAL
COMPARE_EP  -> SG_CHECK_EQUAL_EP
COMPARE_EP2 -> SG_CHECK_EQUAL_EP2
VERIFY      -> SG_VERIFY

Also remove duplicate private definitions of these macros in test
modules, using instead those defined in simgear/misc/test_macros.hxx.
2016-12-04 21:04:40 +01:00
James Turner
b5c1902a2d Tweaks to recursive listener behaviour 2016-12-03 14:09:56 +00:00
James Turner
d088259739 Add aliased listener test, disabled for now. 2016-12-02 17:15:11 +00:00
James Turner
d8acf44a3a Revert unintended change in listener refactoring. 2016-12-02 17:14:27 +00:00
Torsten Dreyer
4664af12fa Fix lockup on Windows when polling DNS, add test 2016-12-02 14:44:38 +01:00
James Turner
7a909d0c0b Improved Package search function.
Handle or/and groups, and search variant descriptions and names.
2016-11-30 21:32:31 +00:00
James Turner
919c25769c Quiet a canvas message. 2016-11-30 12:18:44 +00:00
James Turner
5a0908d5bb Package::indexOfvariant works on fully-qualified IDs.
Should fix issues restoring variants in the launcher.
2016-11-29 15:36:00 +00:00
Erik Hofman
1c39daec07 Fix an error 2016-11-27 10:19:17 +01:00
James Turner
835ae941ce Unit-tests for localised-variant strings. 2016-11-26 14:28:22 +00:00
James Turner
63edff078f Fix warnings in sgvec4 test.
Use C++ type-overloaded fabs call.
2016-11-26 14:20:17 +00:00
Erik Hofman
0ea9786601 Add SIMD matrix operations 2016-11-26 11:40:01 +01:00
Florent Rougon
9e0bb33d58 Fix missing include in simgear/props/props_test.cxx 2016-11-26 01:12:34 +01:00
James Turner
64531c85e3 Generalise per-variant localised string lookup.
Will be used for per-variant long-descriptions.
2016-11-25 22:44:24 +00:00
James Turner
14cdae5102 Unit-test for copy-installed children. 2016-11-25 22:19:55 +00:00
James Turner
2aaad212e8 Revert partial-update mode for TerraSync repos.
Going to implement this a different, simpler way now,
2016-11-25 22:19:51 +00:00
James Turner
bd88bf1126 Explicit handling of recursive listeners.
Use a different strategy for recursive listeners, and make them opt-in.
2016-11-25 16:07:18 +00:00
James Turner
ea9da65b7c Expanded property unit-tests. 2016-11-25 16:07:18 +00:00
Erik Hofman
e7f80cf5f3 Finish SIMD Vector code, do not change matrix operations yet since it seems to have a problem 2016-11-25 13:31:54 +01:00
Erik Hofman
16d62f93c8 Fix a clang reported error 2016-11-22 15:18:16 +01:00
Erik Hofman
e96834fcc6 Fix an error 2016-11-22 14:36:28 +01:00
Erik Hofman
22a74c63b4 First changes for SIMD matrix operations 2016-11-22 14:27:42 +01:00
James Turner
5681fcbdc5 Unit-tests for property listener. 2016-11-22 00:19:18 +00:00
James Turner
7755f8e094 Override changes for atomic listener. 2016-11-22 00:15:14 +00:00
James Turner
e266e44f63 Extended scenery/STG suffix handling 2016-11-22 00:09:51 +00:00
Erik Hofman
4dc66a385e Include SGMathFwd.hxx to add unknown math types 2016-11-21 09:22:09 +01:00
Erik Hofman
aec29a3a37 Fix clang errors 2016-11-20 23:54:15 +01:00
Erik Hofman
0d213a1990 Fix a typo 2016-11-20 16:16:28 +01:00
Erik Hofman
8162a49f6c Give vector math a (potential) boost. Next stoP; matrices 2016-11-20 16:15:40 +01:00
Torsten Dreyer
d2e2603400 initialize udns_library on first use 2016-11-20 16:12:01 +01:00
Erik Hofman
43a8277bdb Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/simgear into next 2016-11-20 15:01:10 +01:00
Erik Hofman
61a8bd5cd3 _m128d ony holds two doubles instead of 4 (obviously). 2016-11-20 15:00:24 +01:00
Erik Hofman
ad6f3d2db2 Small updates 2016-11-20 14:59:43 +01:00
Torsten Dreyer
9088f41352 Use private udns context for each DNSClient 2016-11-20 12:35:43 +01:00
Erik Hofman
73f57bbbd8 Add a test utility 2016-11-19 15:57:05 +01:00
Erik Hofman
a8673356a2 Be more specific about the exact type 2016-11-19 15:56:06 +01:00
James Turner
5ecc1ab6f2 Simplify timing code.
Assumes we have timegm on Unix, and use _mkgmtime on Windows.
This means we never need to use ftime() / timeb.h
2016-11-17 21:23:56 +01:00
Automatic Release Builder
0702f85540 new version: 2017.1.0 2016-11-17 13:43:29 +01:00
Automatic Release Builder
277dab0d55 new version: 2016.4.1 2016-11-17 13:43:29 +01:00
Erik Hofman
321a3fdaba Fix a typo 2016-11-17 13:05:08 +01:00
Erik Hofman
2eb17d0083 Revetr previous paatch for SGVec4 so close to the release 2016-11-17 11:50:15 +01:00
Erik Hofman
ff7e4597e7 Maximize simd optimization 2016-11-17 11:48:16 +01:00
Erik Hofman
4a4baf1b42 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/simgear into next 2016-11-17 09:15:02 +01:00
Erik Hofman
2672d5cd11 include simd.hxx 2016-11-17 09:14:51 +01:00
Erik Hofman
1bf3d7c9b1 Add a copyright header 2016-11-16 15:34:25 +01:00
Erik Hofman
f7c0a7f933 Add a simd_t<int> class and more inlining 2016-11-16 14:00:25 +01:00
Erik Hofman
6bf864babb Add class assingment functions 2016-11-16 13:33:51 +01:00