Skip to content

Commit 7af54db

Browse files
committed
Use InternedStrings for testing
1 parent 10c2cbc commit 7af54db

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
StrTables
1+
InternedStrings

test/runtests.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using ModuleInterfaceTools
55

66
@api test
77

8-
@api extend StrTables
8+
@api extend InternedStrings
99

1010
@api list StrTables
1111

@@ -18,12 +18,12 @@ end
1818
@test myname == "Scott Paul Jones"
1919
end
2020

21-
cvt_char(x::Integer) = 1
22-
cvt_char(x::Float64) = 2
21+
intern(x::Integer) = 1
22+
intern(x::Float64) = 2
2323

2424
@testset "Function extension" begin
25-
@test typeof(cvt_char("foo")) == Vector{Char}
26-
@test cvt_char(1) == 1
27-
@test cvt_char(2.0) == 2
28-
@test cvt_char("th") == Char['t', 'h']
25+
@test typeof(intern("foo")) == String
26+
@test intern(1) == 1
27+
@test intern(2.0) == 2
28+
@test intern("th") == "th"
2929
end

0 commit comments

Comments
 (0)