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

More tests for float functions and some small tests elsewhere #12318

Merged
merged 3 commits into from
Jul 27, 2015

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Jul 26, 2015

A bunch of floatfuncs.jl was not tested so I made a new file for it.

reduce.jl and test.jl had small throws/paths that weren't tested, added tests for those.

Added tests for the environment variable functions in rounding.jl which weren't tested fully.

@kshyatt kshyatt added test This change adds or pertains to unit tests maths Mathematical functions labels Jul 26, 2015
@kshyatt
Copy link
Contributor Author

kshyatt commented Jul 26, 2015

Gah! This passed locally. I will fix + update.

e: there we go!

@@ -90,7 +90,8 @@ end
@test isapprox(.1+.1+.1, .3)
@test !isapprox(.1+.1+.1, .4)

@test_throws UndefVarError test_approx_eq(ones(10),ones(11),1e-8,"a","b")
@test_throws UndefVarError test_approx_eq(ones(10),zeros(10),1e-8,"a","b")
Copy link
Contributor

Choose a reason for hiding this comment

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

how are these UndefVarErrors?

ah, I think this needs to be Test.test_approx_eq

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are throwing a generic error("stuff"). I thought the correct thing was UnderVarError but maybe it should be ErrorException instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Generic error throws an ErrorException, this is throwing UndefVarError because it isn't qualified as Test.test_approx_eq

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh no!!! I'm sorry. I'll fix it. Thanks for catching this and reviewing my bad PRs :)

@tkelman
Copy link
Contributor

tkelman commented Jul 27, 2015

lgtm

kshyatt added a commit that referenced this pull request Jul 27, 2015
More tests for float functions and some small tests elsewhere
@kshyatt kshyatt merged commit a3f0605 into master Jul 27, 2015
@kshyatt kshyatt deleted the ksh/floattests branch July 27, 2015 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maths Mathematical functions test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants