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

Branch for working on rust support #12 #28

Merged
merged 13 commits into from
Sep 13, 2015
Merged

Conversation

WaDelma
Copy link
Contributor

@WaDelma WaDelma commented Sep 4, 2015

#18, #17 and #16

if (result.isPresent()) {
return parseResult(result.get(), dir);
}
return EMPTY_FAILURE;
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how it is currently done elsewhere but returning empty value instead of error/exception omits the error (or is this just backup solution...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you mean here.

Copy link
Member

Choose a reason for hiding this comment

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

How it would look to the end user if the cargo test fails

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cargo test failing here would mean that there was an IOException while running the command. I am not sure what situation this would happen that wouldn't already happen while building tests. And compilation output when compilation failure happens is already preserved.
Dunno how to how to deal this.

@jamo
Copy link
Member

jamo commented Sep 4, 2015

Please add rust and other deps to travis.

return PARSING_FAILED;
}

private Optional<List<String>> parseResults(String[] lines) {
Copy link
Member

Choose a reason for hiding this comment

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

Why Optional if we never return Optional.absent(): can't we just return the empty list?

@jamo
Copy link
Member

jamo commented Sep 13, 2015

Please squash the fixed travis into one commit and ping me so that I can merge this.
ping @ljleppan @UMTti for LGTM


#[test]
fn it_shall_work() {

Choose a reason for hiding this comment

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

Is this function block empty for purpose? I do not know Rust but it seems weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test fails when there is a panic (that wasn't expected). In this case I am testing that if student adds their own test that has same name as test for the exercise that it doesn't break.

Copy link
Member

Choose a reason for hiding this comment

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

Let's comment it here (what is tested if it's not obvious)


assertEquals(RunResult.Status.COMPILE_FAILED, result.status);
assertTrue(result.logs.containsKey(SpecialLogs.COMPILER_OUTPUT));
assertTrue(new String(result.logs.get(SpecialLogs.COMPILER_OUTPUT)).contains("aborting due to previous error"));
Copy link
Member

Choose a reason for hiding this comment

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

Line length over 100 chars

@ljleppan
Copy link
Member

Added a few more nits, after those: LGTM.

@jamo
Copy link
Member

jamo commented Sep 13, 2015

All seems to be fine, LGTM,

Nice work!

jamo added a commit that referenced this pull request Sep 13, 2015
Added initial support for Rust.
@jamo jamo merged commit f8b1506 into testmycode:master Sep 13, 2015
@WaDelma WaDelma deleted the rust branch September 13, 2015 16:04
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 84.494% when pulling 728b54b on WaDelma:rust into 78e97c9 on testmycode:master.

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.

None yet

6 participants