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

use testsets #222

Merged
merged 1 commit into from
Jan 27, 2018
Merged

use testsets #222

merged 1 commit into from
Jan 27, 2018

Conversation

jw3126
Copy link
Contributor

@jw3126 jw3126 commented Jan 27, 2018

Replace FactCheck by testsets.

@fact evaluate(vecnorm(x, 2)) --> roughly(norm(vec(A), 2), TOL);
@fact evaluate(vecnorm(x, 7)) --> roughly(norm(vec(A), 7), TOL);
@fact evaluate(vecnorm(x, Inf)) --> roughly(norm(vec(A), Inf), TOL);
$(Expr(:toplevel, :(@test isapprox(evaluate(norm(x)), norm(A), atol=TOL))))
Copy link
Member

Choose a reason for hiding this comment

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

Why does this need to be wrapped in toplevel? Shouldn't @test isapprox(evaluate(norm(x)), norm(A), atol=TOL) work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. This was not intended! The reason is that this was done by a hacky script that proceeds line by line and parse("foo;") (note the ;) gives Expr(:toplevel, :foo).

@mlubin mlubin merged commit f39dd3c into jump-dev:master Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants