Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a JUnit test harness for Copper. #12

Closed
schwerdf opened this issue Apr 18, 2017 · 2 comments
Closed

Create a JUnit test harness for Copper. #12

schwerdf opened this issue Apr 18, 2017 · 2 comments
Assignees
Milestone

Comments

@schwerdf
Copy link
Contributor

Before the new release of Copper, it should be outfitted with its own test harness.

Historically I have avoided creating a test harness based on JUnit to avoid making the Copper build dependent on anything but the Java standard class library and ANT. This independence can be maintained if we move the existing Copper project into a directory Copper and then add a new Eclipse project in a directory CopperTests, with dependency links to the original project and to JUnit.

We can start with a set of regression tests that build each of the existing test grammars and then try to compile the resulting parsers. Later, runtime tests should be added as well, with at least one valid and one invalid input for each parser.

@schwerdf schwerdf added this to the Copper 0.8.0 milestone Apr 18, 2017
@schwerdf schwerdf self-assigned this Apr 18, 2017
@tedinski
Copy link
Member

tedinski commented Jun 1, 2017

One possibility is we could switch over to Maven. It can resolve compile-time build dependencies like JUnit and integrates well with Eclipse, I believe.

And... it might be a nice (very) long-term goal to someday have our jars in Maven Central. People could just write Silver code, invoke maven and have it fetch the copper compiler/runtime, silver compiler/runtime/stdlib automatically. Even the appropriate versions according to what the source specifies.

However, it would mean adopting the (seemingly fairly standard) java jar file naming conventions... edu.umn.cs.melt.copper.compiler-0.8.0.jar instead of CopperCompiler.jar for example. I don't think there'd be any other drawbacks, though? (Ah, perhaps reorganizing the repo into two artifacts... the runtime and the compiler.)

@schwerdf
Copy link
Contributor Author

One runtime test has now been added, which should be enough to detect trouble with the output parsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants