This change is useful for two reasons: it gives us a more consistent
structure of the tests that allow fast browsing through the test suite
and it also allow us to distinguish which tests are missing (e.g. tests
that check the binary format but not the json format). Also, an important
point is that this is the first step to port the test suite to Scalajs and
reuse most of its components. For doing that, we're importing staticOnly
all over the place and therefore we figure out which tests are Scalajs friendly
and which are not.
Disclaimer: the Scalajs restructure will be also done in this PR.
Changes
Add staticOnly flag to most of binary tests
Binary tests are now compiled with the static flag, however there are
still some bad boys that need to be moved to the JVM folder, since they
need reflection somehow.
Rename a rebel test filename to follow current nomenclature.
Group better the tests
Rename logic to generation to store all the tests related with the
correct generation of picklers for any type.
Move generator, pickler, tags and internal to generation.
Rename tests to specify their own format
When the test suite is run, it's confusing to know figure out the failed
test since some tests are repeated for different formats
(binary and json) with the same test name.
Merge the tests and change the overall structure
This change is useful for two reasons: it gives us a more consistent
structure of the tests that allow fast browsing through the test suite
and it also allow us to distinguish which tests are missing (e.g. tests
that check the binary format but not the json format).
Also, it removes ~3 repeated tests and it adds ~3 test suites. One of
them checks that our picklers are thread-safe in both formats.
Some renames have been made to make clearer what tests are supposed to
do, and therefore they are a little bit more verbose. A little subset
has the name of the test class (and not only the file) changed, but
this is practically unimportant.
Lastly, the modularity of the tests will help to have more granularity
to select tests for the scalajs support. That is the next step.
Update scalatest and fix scalatest issue 873
Update to M15 of latest release of scalatest that is now ScalaJS
compatible.
Make sure sbt recognises the dependencies as test runners.
Fix scalatest issue 873, caused by a bad interaction between the
assert macro and our generated picklers and unpicklers. The assert
macro is going to cache the condition that is testing and is going to
convert it to a String to show it to the user in case of failure.
If the condition that is evaluated by assert uses pickle and
unpickle and the generated picklers/unpicklers are very big, they
surpass the 65k length limit imposed by the code generators (both in
ScalaJS and the JVM) since they store the length in two bytes.
staticOnly
all over the place and therefore we figure out which tests are Scalajs friendly and which are not.Disclaimer: the Scalajs restructure will be also done in this PR.
Changes
Add
staticOnly
flag to most of binary testsGroup better the tests
logic
togeneration
to store all the tests related with the correct generation of picklers for any type.generator
,pickler
,tags
andinternal
togeneration
.Rename tests to specify their own format
Merge the tests and change the overall structure
Update scalatest and fix scalatest issue 873
String
to show it to the user in case of failure. If the condition that is evaluated by assert usespickle
andunpickle
and the generated picklers/unpicklers are very big, they surpass the 65k length limit imposed by the code generators (both in ScalaJS and the JVM) since they store the length in two bytes.