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

Some small tweaks. #4

Merged
merged 8 commits into from
Aug 17, 2019

Conversation

xingweitian
Copy link
Contributor

This PR makes some changes:

  1. Unify the name of the test files, e.g., in the past they are called ImmutabilityInferenceTest and ImmutabilityTypecheckTests, now they are called ImmutabilityInferenceTests and ImmutabilityTypecheckTests.
  2. Fix typos.
  3. Remove the duplicate ";" in a test case: testinput/typecheck/SuperClass.java.

Because they are just some small tweaks, so I guess I can put them all in a single PR. If this sounds not good, I can also separate it in three different PRs.

build.gradle Outdated
@@ -79,7 +79,7 @@ afterEvaluate {
// Create a task for each JUnit test class whose name is the same as the JUnit class name.
sourceSets.test.allJava.filter { it.path.contains("${picoPath}/src/test/java") }.forEach { file ->
String junitClassName = file.name.replaceAll(".java", "")
String testName = junitClassName.replaceAll("Test", "")
String testName = junitClassName.replaceAll("Tests", "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Checker Framework the test drivers all end with Test: https://github.com/typetools/checker-framework/tree/master/checker/src/test/java/tests
So we should do the renaming from xxxTests -> xxxTest.

The corresponding code in the CF build file https://github.com/typetools/checker-framework/blob/master/build.gradle#L533
doesn't substitute names. Why is this neede?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not mandatory to substitute names, just for showing the simple names in terminal.

I will rename it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After substituting names, if we execute ./gradlew tasks, we will get something like this:

Verification tasks
------------------
check - Runs all checks.
ImmutabilityInferenceTest - Run ImmutabilityInference tests.
ImmutabilityTypecheckTest - Run ImmutabilityTypecheck tests.
test - Runs the unit tests.

If we do not substitute names, it will be like:

Verification tasks
------------------
check - Runs all checks.
ImmutabilityInferenceTest - Run ImmutabilityInferenceTest tests.
ImmutabilityTypecheckTest - Run ImmutabilityTypecheckTest tests.
test - Runs the unit tests.

So I think maybe it is better to substitute names to get a better description.

@xingweitian
Copy link
Contributor Author

@wmdietl Could you please have another look?

Copy link
Member

@wmdietl wmdietl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thanks.

@xingweitian xingweitian merged commit 147db8d into opprop:adapt-to-cf-master Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants