Skip to content

Commit

Permalink
Merge pull request #32 from willtebbutt/wct/fix-test
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
dfdx authored May 17, 2023
2 parents 15d8b2a + 237750d commit a76107a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false

matrix:
version:
- '1.6'
Expand Down
9 changes: 8 additions & 1 deletion test/test_trace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,15 @@ end
@test tape[V(4)].fn == __new__

# constructor with splatnew
# This test seems to be quite brittle, and to depend on the precise version of Julia
# used. Might be good to refactor this in the future.
# If this test fails for a new version of Julia, it might well not be an actual bug.
_, tape = trace((x, y) -> SplatNewTester(x, y), 5.0, 4)
@test tape[V(10)].fn == __new__
if VERSION < v"1.9"
tape[V(10)].fn == __new__
else
tape[V(7)].val == __new__
end
end


Expand Down

0 comments on commit a76107a

Please sign in to comment.