-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
Description
The test in JCM mostly use code matching.
This is weird because this should instead be checked using compiler.
I propose the following changes :
- a /jcodemodeltests module, with whatever groupId:artifactid ; depends on main JCodemodel module.
- a
@JCMTestedannotation to place on the test classes that generate JCodemodel instances - an annotation processor that generates the corresponding classes in src/test/generated
This way I could have a test class in src/main/java with
public JCodemodel createSimpleIntRecord(){
// do the creation and return the CM
}and the corresponding test in src/test/java with
@Test public void testSimpleIntRecord(){
SimpleIntrecord sr = new SimpleIntRecord(24);
}That's the basic idea, if yo have better one I'm all hear.