Commit graph

1581 commits

Author SHA1 Message Date
Erik Ogenvik
2f55d5d82b Fixed various compile issues after rebase. 2016-06-26 21:50:10 +02:00
Erik Ogenvik
cb493811b3 Added "forces" property.
This property describes all external forces affecting the entity.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
9cf67cb412 Added tests for Mode and ModeSpec properties. 2016-06-26 20:17:18 +02:00
Erik Ogenvik
1c69b3aae6 Use camel casing for tests.
This makes it much easier to find them in various editors.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
d2e37de29b Provide better naming of tests.
Easier to find in IDEs.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
6a5a2b2938 Fixed tests. 2016-06-26 20:17:18 +02:00
Erik Ogenvik
12a38b3d0f Added a mode specification property.
This property tells how the entity should behave when put into
different modes. Currently we only allow for specific transformations
to occur.

The mode specifications are registed in properties where "mode-" forms
a prefix, and the mode a suffix. For example, "mode-planted".
This also does away with the "plantable" property.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
4d4cdbef23 Fixed tests after transforms property. 2016-06-26 20:13:31 +02:00
Erik Ogenvik
1f616c869b Fixed tests after Plantable property. 2016-06-26 19:08:54 +02:00
Erik Ogenvik
d7bf27d180 Take plantable adjustment into account.
When an entity which is "planted" is adjusted, we also look
for if there's any offset specified for the height adjustment.
2016-06-26 19:08:54 +02:00
Erik Ogenvik
c9ebbfd6c6 Added method for determining visibility.
And then use that to determine if parent locations should be shown.
2016-06-26 14:18:37 +02:00
Erik Ogenvik
c981f35d0d Added integration tests for Thing.
Which currently mainly performs visibility calculation
tests.
2016-06-26 13:18:14 +02:00
Erik Ogenvik
5ab3e5e61f Made logic for distance checks more sound. 2016-06-26 13:17:32 +02:00
Erik Ogenvik
ebefb98283 Fixed tests. 2016-06-22 20:53:43 +02:00
Erik Ogenvik
760f92f707 Alter how visibility is determined.
When checking visibility, we now use the Domains more extensively.
The base rules are:
* If an entity is a child of a domain-less entity, visiblity for the
  child is the same as for the parent.
* If an entity is a child of a domain-holding entity, visibility is
  determined by the Domain.
* Entities cannot observe things above a Domain.
* Entities can observe things below a Domain, if the Domain allows it.

These rules are not yet set in stone. We need some more time figuring out
exactly how we want visibility implemented. We're striving for a balance
between a powerful but not too complex system, with good performance.
2016-06-22 17:29:27 +02:00
Erik Ogenvik
eb81c7eecb Use "git describe" for buildid.
Also removed circular dependency as well as CVS leftover script.
2016-06-22 17:06:50 +02:00
Erik Ogenvik
e6f645685e Ignore warnings in tests.
When writing tests we're often sloppy, and don't care about stuff
like initialization order etc..
2016-06-22 16:58:14 +02:00
Erik Ogenvik
5432efab1e Fixed tests. 2016-06-09 22:40:05 +02:00
Erik Ogenvik
e4ef1ef10f Updated tests. 2016-03-19 23:05:13 +01:00
Erik Ogenvik
e794992d3d MultiLineListFormatter was moved to Atlas. 2016-03-18 23:36:57 +01:00
Erik Ogenvik
37bcfbd4db Handle Atlas API changes. 2016-03-18 20:07:23 +01:00
Erik Ogenvik
bdaacc87ab Handle exposue for private members better.
In more recent versions of GCC there will be errors if
std::string has its private members exposed.
2016-01-15 16:46:48 +01:00
Erik Ogenvik
16cc5778df Fixed broken tests. 2015-12-19 15:28:29 +01:00
Erik Ogenvik
da9b7857a9 Added test for inheritance. 2015-07-12 18:23:39 +02:00
Yaroslav Taben
f83a19568c Add instance_of provider test
This test specifically aims to test the type inheritance
i.e. case where barrel is also a thing
but a thing is not a barrel
2015-07-10 13:56:20 -07:00
Yaroslav Taben
02cb5e3d62 Add thing type as parent of other types for tests 2015-07-10 13:55:53 -07:00
Yaroslav Taben
5933d3dbcf Add Not operator tests to Filter and Parser tests 2015-06-06 11:09:54 -07:00
Yaroslav Taben
285455a228 Add NotPredicate tests 2015-06-06 10:23:13 -07:00
Erik Ogenvik
d3b9d1788b Use Atlas 0.7. 2015-06-04 21:41:27 +02:00
Erik Ogenvik
a768c7d63d Added missing test stubs. 2015-05-28 22:05:09 +02:00
Erik Ogenvik
74bb437540 Fixed tests. 2015-05-24 11:25:08 +02:00
Erik Ogenvik
3eedbe366b Prefer nullptr for expressiveness. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
898d2f312c Spelling fix. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
f5dae1fba7 Rename Teleport* to Possess*
So that the functionality can be used in more general situations.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
0b64e56fb3 Properly return test failures.
In order for ASSERT_TRUE and friends to work we must return the result
from "run" in the main function. Any non-zero value indicates a test
failure.
2015-05-24 11:18:09 +02:00
Erik Ogenvik
888542be5d Don't cast when doing comparisons. 2015-05-24 10:54:21 +02:00
Yaroslav Taben
a99f8eef4c Use built in assert instead of the macro
This may help avoid confusion in future due to
a problem with macro assert not reporting failures properly
2015-05-23 10:11:54 -07:00
Yaroslav Taben
dfd0995650 Removed most of the old tests from Filter tests 2015-05-23 10:10:40 -07:00
Yaroslav Taben
d334745398 Add contains_recursive providers tests 2015-05-23 10:08:26 -07:00
Yaroslav Taben
53fea75e33 Add tests for predicates with list comparators
Examples include in and contains operators
2015-05-23 09:40:16 -07:00
Yaroslav Taben
57da7648fd Fix minor formatting issues and bugs in tests 2015-05-23 09:31:52 -07:00
Yaroslav Taben
fe998307d2 Add logical predicates tests
These tests are added to ComparePredicates tests since there are
so few of them
2015-05-23 09:30:46 -07:00
Yaroslav Taben
9e807dc3ed Add Comparer predicate tests
These tests are moved from EntityFiltertest
2015-05-23 09:26:55 -07:00
Yaroslav Taben
cc282d299a Fix overlooked bugs in existing providers tests
These bugs were overlooked because even though the existing
ASSERT macros in the test suite seem to be clearer and
more informative, they do not report a failure of the test
suite even if a given test fails. They only make a not in the log.
For now, we will use built-in assert to make sure that
failing tests are caught.
2015-05-23 09:12:54 -07:00
Yaroslav Taben
71127755fc (WIP) Rewrite filter tests using TestBase class
This is a fairly complex change with a simple goal.
Instead of holding all test cases in the main function,
we reorganize it into a proper test suit.
The tests are groupped up into appropriate test methods.
This should improve the clarity of test cases and ease
addition of new test cases.
2015-05-16 19:15:00 -07:00
Yaroslav Taben
e03c211228 Added outfit provider tests 2015-05-14 13:31:43 -07:00
Yaroslav Taben
1ff891610e Implement teardown in Providers tests 2015-05-10 18:12:27 -07:00
Yaroslav Taben
4d9a2f1fdf Fix formatting in providers tests and added docs 2015-05-10 18:11:51 -07:00
Yaroslav Taben
3a96ef9dec Add BBox providers tests 2015-05-10 18:09:30 -07:00
Yaroslav Taben
6b05dd84af Add entity property providers tests
Also added code to set up provider tests.
2015-05-10 18:09:05 -07:00