- Added test resources;
- Added inner test classes for new assert functions to test_test.gd;
- Added
assert_setget_called
, assert_setget
, assert_property
and three helper functions to test.gd
- Added readme samples
Wiki description: I will create a second PR against the wiki to add the wiki description and examples for new asserts => If that fails i can add them here later.
questions:
- There is two helper functions to retrieve a class from an object and vise versa. I added them to the test.gd script because I use them over there but I feel they might be better part of the utils.gd script. What do you think?
- There is an issue with the gut internal timers when gut is setup in the unit tests (test_test.gd). You can see my comment in the
before_each
methods of the inner test classes for the new asserts. => I do not want the code from before_each
to be merged but I'd like to hear your opinion on how to handle this. (And sorry for being rude accessing internal gut attributes...) => My suggestion would be to create a separate issue for that and resolve it over there.
Test runs: At the end of this PR I will add the summaries of test run on the current masters code ("before changes from this PR") and test run after making the changes. As you will see, I didn't started with zero failed tests but I also didn't create new ones. For the orphans I created three new ones => according to #204 this is correct.
----- summary test run before changes from this PR:
Totals
Scripts: 31
Tests: 668
Passing asserts: 875
Failing asserts: 19
Pending: 4
Warnings/Errors:
- 13 Errors.
- 13 Warnings.
- 6 Deprecated calls.
875 passed 19 failed. Tests finished in 46.9s
[Orphans]: 6242 new orphans(total).
Note: This count does not include GUT objects that will be freed upon exit.
It also does not include any orphans created by global scripts
loaded before tests were ran.
Total orphans = 6338
----- summary test run after changes from this PR:
Totals
Scripts: 31
Tests: 694
Passing asserts: 906
Failing asserts: 19
Pending: 4
Warnings/Errors:
- 13 Errors.
- 13 Warnings.
- 6 Deprecated calls.
906 passed 19 failed. Tests finished in 47.3s
[Orphans]: 6242 new orphans(total).
Note: This count does not include GUT objects that will be freed upon exit.
It also does not include any orphans created by global scripts
loaded before tests were ran.
Total orphans = 6341