Closed markuswagnergithub closed 4 years ago
@codykenb is this there for a reason? Can we safely remove it?
It can be safely removed. It's there as I wanted all sort test cases to subclass this one. The test cases for each sort algorithm only differ by the sort algorithm method they call.
Shouldn't we fix it to incorporate the superclass?
Ah, I see a comment in Slack regarding this:
codykenny [6:27 PM] We might need to extend gin to load the super type?
Did you try using a superclass previously?
Yes I tried subclassing the tests for each sort from SortTest but no individual was compiling. I couldn't see exactly the problem, but I can see where the Test.class is read in.
Ideally we should load the superclass, and this is something that will likely be handy when we tackle larger programs with more tests. It might be a good idea to do this when designing the loading of multiple java files ? (The functionality exists as part of eclipse, but maybe there is something more lightweight?)
ok, I'll take a look later today, thanks.
Can confirm subclassing causes compile errors when running Gin on SortBubble
The problem is that Gin currently copies the test, along with the source, to a new folder for compilation. It doesn't copy any other classes, so the test superclass is not found by the compiler. A fix will request us thinking hard about how to make Gin multi-file. Suggest we discuss on Slack and come back.
This is going to have to be fixed by multiclass capability, raised as another issue #10
No longer relevant...
There is a lonely SortTest.java in examples/locoGP