Description
Below is the first part of the path:
tester/src/test/scala/spinal/
The standard for unit tests would be:
PROJECT/src/test/scala/spinal/
So let's admit that (most) tests running simulations are integration tests, hence putting them in a separate tester/
module. It also simplifies dependencies management for the day we want to use features released in tester/
to test something from core/
or lib/
.
IMHO nothing to change here 👍
tester/src/test/scala/spinal/tester/
^^^^^^
Then there is the tester/
folder. As it is about integration tests, it forces to import tested things (else using the same package as the test being run would bring in scope the stuff if the same package), making tests look more like examples, to better test the user's API, which seems to be a good thing.
IMHO nothing to change here 👍
Then there are lots of tests with poor organization. Below is a suggestion:
drafts/
for worksheets (old things that could be removed IMHO), so that most contributors can forget thempath/to/item.scala
where the first element of the path is basicallycore
,lib
, etc. without being repeated.issues/IssueXXX.scala
for bug fixes
For instance:
tester/src/test/scala/spinal/tester/scalatest/AhbLite3InterconnectTester.scala
tests:
lib/src/main/scala/spinal/lib/bus/amba3/ahblite/AhbLite3Interconnect.scala
So it would be moved to:
tester/src/test/scala/spinal/tester/lib/bus/amba3/ahblite/AhbLite3InterconnectTester.scala
Tests about different elements (elements being tested, not elements used to test other elements) would be in the deepest common element in the paths.
I think it is okay to have App
s to test Scala syntax and types among scalatest-run tests.
This way it would be easier to find and add more tests.