gintool / gin

GI in No Time - a Simple Microframework for Genetic Improvement
MIT License
43 stars 21 forks source link

lonely SortTest.java #6

Closed markuswagnergithub closed 4 years ago

markuswagnergithub commented 6 years ago

There is a lonely SortTest.java in examples/locoGP

drdrwhite commented 6 years ago

@codykenb is this there for a reason? Can we safely remove it?

codykenb commented 6 years ago

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.

drdrwhite commented 6 years ago

Shouldn't we fix it to incorporate the superclass?

drdrwhite commented 6 years ago

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?

codykenb commented 6 years ago

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?)

drdrwhite commented 6 years ago

ok, I'll take a look later today, thanks.

drdrwhite commented 6 years ago

Can confirm subclassing causes compile errors when running Gin on SortBubble

drdrwhite commented 6 years ago

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.

drdrwhite commented 6 years ago

This is going to have to be fixed by multiclass capability, raised as another issue #10

sandybrownlee commented 4 years ago

No longer relevant...