-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve builtins consistency check (#544)
* improve builtins consistency check Use DeepDiffs.jl for printing nice diffs and only print diff if something actually changed. Also stop hardcoding 1.9 as check for the build being a nightly version. * add DeepDiffs in CI * skip builtin check on Windows
- Loading branch information
1 parent
8cb0bf3
commit 8725668
Showing
3 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
using Test | ||
using Test, DeepDiffs | ||
|
||
@static if VERSION >= v"1.9.0-" | ||
@static if !Base.GIT_VERSION_INFO.tagged_commit && # only run on nightly | ||
!Sys.iswindows() # TODO: Understand why this fails, probably some line endings | ||
@testset "Check builtin.jl consistency" begin | ||
builtins_path = joinpath(@__DIR__, "..", "src", "builtins.jl") | ||
old_builtins = read(builtins_path, String) | ||
include("../bin/generate_builtins.jl") | ||
new_builtins = read(builtins_path, String) | ||
print(builtins_path, old_builtins) | ||
@test old_builtins == new_builtins | ||
consistent = old_builtins == new_builtins | ||
if !consistent | ||
println(deepdiff(old_builtins, new_builtins)) | ||
end | ||
@test consistent | ||
end | ||
end |