Skip to content

Commit 081db3d

Browse files
authored
Merge pull request #11 from jw3126/v16
fix tests
2 parents 45e72e6 + 1c16c90 commit 081db3d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StructHelpers"
22
uuid = "4093c41a-2008-41fd-82b8-e3f9d02b504f"
33
authors = ["Jan Weidner <jw3126@gmail.com> and contributors"]
4-
version = "1.3"
4+
version = "1.3.0"
55

66
[deps]
77
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
@@ -11,8 +11,8 @@ ConstructionBase = "1.3"
1111
julia = "1.6"
1212

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

1717
[targets]
1818
test = ["Test", "StructTypes"]

test/runtests.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,15 @@ struct SNoIsEqual; a; end
9393
@test Empty1() != Empty2()
9494
@test hash(Empty1()) != hash(Empty2())
9595

96-
@test_throws "Bad keyword argument value:" @macroexpand @batteries SErrors kwconstructor="true"
97-
@test_throws "Unsupported keyword" @macroexpand @batteries SErrors kwconstructor=true nonsense=true
98-
@test_throws "Expected a keyword argument of the form name = value" @macroexpand @batteries SErrors nonsense
96+
if VERSION >= v"1.8"
97+
@test_throws "Bad keyword argument value:" @macroexpand @batteries SErrors kwconstructor="true"
98+
@test_throws "Unsupported keyword" @macroexpand @batteries SErrors kwconstructor=true nonsense=true
99+
@test_throws "Expected a keyword argument of the form name = value" @macroexpand @batteries SErrors nonsense
100+
else
101+
@test_throws Exception @macroexpand @batteries SErrors kwconstructor="true"
102+
@test_throws Exception @macroexpand @batteries SErrors kwconstructor=true nonsense=true
103+
@test_throws Exception @macroexpand @batteries SErrors nonsense
104+
end
99105

100106

101107
@testset "typesalt" begin

0 commit comments

Comments
 (0)