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 approx for better failure output #54

Merged
merged 2 commits into from Jan 6, 2021
Merged

use approx for better failure output #54

merged 2 commits into from Jan 6, 2021

Conversation

michaelkirk
Copy link
Member

Gives output like:

assert_relative_eq!(t.x(), 1450880.29)

    left  = 0.0
    right = 1450880.29

vs previously:

thread 'proj::test::test_london_inverse' panicked at 'assertion failed: f > 0.99999', src/proj.rs:885:9

@urschrei
Copy link
Member

urschrei commented Jan 5, 2021

Very nice! Are the test failures coming from the switch to a different approximation?

@michaelkirk
Copy link
Member Author

Very nice! Are the test failures coming from the switch to a different approximation?

Yeeeeep sorry. I'm working through updating them. 😓

@michaelkirk michaelkirk force-pushed the mkirk/use-approx branch 6 times, most recently from 495e232 to f87775e Compare January 6, 2021 00:10
@michaelkirk
Copy link
Member Author

Ok, sorry for the noise. All fixed up!

@urschrei
Copy link
Member

urschrei commented Jan 6, 2021

Excellent. Thanks!

@urschrei
Copy link
Member

urschrei commented Jan 6, 2021

Bors r+

bors bot added a commit that referenced this pull request Jan 6, 2021
54: use `approx` for better failure output r=urschrei a=michaelkirk

Gives output like:
```
assert_relative_eq!(t.x(), 1450880.29)

    left  = 0.0
    right = 1450880.29
```

vs previously:
```
thread 'proj::test::test_london_inverse' panicked at 'assertion failed: f > 0.99999', src/proj.rs:885:9
```


Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
@bors
Copy link
Contributor

bors bot commented Jan 6, 2021

Build failed:

@urschrei
Copy link
Member

urschrei commented Jan 6, 2021

😤

@urschrei
Copy link
Member

urschrei commented Jan 6, 2021

bors retry

bors bot added a commit that referenced this pull request Jan 6, 2021
54: use `approx` for better failure output r=urschrei a=michaelkirk

Gives output like:
```
assert_relative_eq!(t.x(), 1450880.29)

    left  = 0.0
    right = 1450880.29
```

vs previously:
```
thread 'proj::test::test_london_inverse' panicked at 'assertion failed: f > 0.99999', src/proj.rs:885:9
```


Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
@bors
Copy link
Contributor

bors bot commented Jan 6, 2021

Build failed:

@michaelkirk
Copy link
Member Author

huh... this is indeed the test which apparently tends to flake out... but this time it's "close".

Let me dig in a little more and see if this is related to my approx changes this time.

test src/proj.rs - proj::ProjBuilder::proj_known_crs (line 391) ... ok

failures:

---- src/proj.rs - proj::Proj::project_array (line 730) stdout ----
Test executable failed (exit code 101).

stderr:
thread 'main' panicked at 'assert_relative_eq!(v[0].x(), 500119.70, epsilon = 1e-2)
    left  = 499972.7074429854
    right = 500119.7
', src/proj.rs:15:1

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    src/proj.rs - proj::Proj::project_array (line 730)

test result: FAILED. 8 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--doc'
Error: Process completed with exit code 101.

@michaelkirk
Copy link
Member Author

I'll rebase this and update expectations from the new test once #56 is merged

@michaelkirk
Copy link
Member Author

bors retry

Seems like #56 did the trick!

@bors
Copy link
Contributor

bors bot commented Jan 6, 2021

Build succeeded:

@bors bors bot merged commit 3c33538 into master Jan 6, 2021
@frewsxcv frewsxcv deleted the mkirk/use-approx branch January 16, 2021 23:29
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

2 participants