Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jw3126 committed Aug 1, 2024
1 parent 45e72e6 commit 1c16c90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StructHelpers"
uuid = "4093c41a-2008-41fd-82b8-e3f9d02b504f"
authors = ["Jan Weidner <[email protected]> and contributors"]
version = "1.3"
version = "1.3.0"

[deps]
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
Expand All @@ -11,8 +11,8 @@ ConstructionBase = "1.3"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "StructTypes"]
12 changes: 9 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,15 @@ struct SNoIsEqual; a; end
@test Empty1() != Empty2()
@test hash(Empty1()) != hash(Empty2())

@test_throws "Bad keyword argument value:" @macroexpand @batteries SErrors kwconstructor="true"
@test_throws "Unsupported keyword" @macroexpand @batteries SErrors kwconstructor=true nonsense=true
@test_throws "Expected a keyword argument of the form name = value" @macroexpand @batteries SErrors nonsense
if VERSION >= v"1.8"
@test_throws "Bad keyword argument value:" @macroexpand @batteries SErrors kwconstructor="true"
@test_throws "Unsupported keyword" @macroexpand @batteries SErrors kwconstructor=true nonsense=true
@test_throws "Expected a keyword argument of the form name = value" @macroexpand @batteries SErrors nonsense
else
@test_throws Exception @macroexpand @batteries SErrors kwconstructor="true"
@test_throws Exception @macroexpand @batteries SErrors kwconstructor=true nonsense=true
@test_throws Exception @macroexpand @batteries SErrors nonsense
end


@testset "typesalt" begin
Expand Down

0 comments on commit 1c16c90

Please sign in to comment.