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

Change ≅ to ≣ in numbers.jl tests #18599

Merged
merged 1 commit into from
Sep 20, 2016

Conversation

pabloferz
Copy link
Contributor

Fixes #18598

@stevengj
Copy link
Member

We should probably use something like (identical to) in numbers.jl anyway (for isequal) rather than

@pabloferz pabloferz force-pushed the pz/testnumbers branch 2 times, most recently from 2f579db to e66a315 Compare September 20, 2016 13:28
@pabloferz pabloferz changed the title Put definition of ≅ for numbers.jl tests in a let block Change ≅ to ≣ in numbers.jl tests Sep 20, 2016
@pabloferz
Copy link
Contributor Author

seems better. PR updated.

@stevengj
Copy link
Member

LGTM.

@stevengj
Copy link
Member

Travis failure due to timeout on OSX (log saved in gist: https://gist.github.com/stevengj/3be00775bf429cfbe1af1147b3781eb5) … restarted Travis.

@@ -1,5 +1,7 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license

≣(a, b) = isequal(a, b) # convenient for comparing NaNs
Copy link
Member

@stevengj stevengj Sep 20, 2016

Choose a reason for hiding this comment

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

As a general style note, when we define operators to be equivalent to functions, we generally use const ≣ = isequal. This has some advantages: docstrings for work, typing at the REPL prints isequal so it is self-documenting to some extent, and compilation time is decreased. Not that these considerations matter much in a test file, however.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted. The reason I defined as a function was to avoid something like #18598 again (in the case someone defines as another function in another test).

Copy link
Member

Choose a reason for hiding this comment

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

Okay.

@stevengj stevengj merged commit 47fbd9c into JuliaLang:master Sep 20, 2016
@pabloferz pabloferz deleted the pz/testnumbers branch September 21, 2016 15:11
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