|
1 | 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license
|
2 | 2 |
|
3 | 3 | using Test, Random
|
4 |
| -using Test: guardseed, _is_simple_call, _function_name |
| 4 | +using Test: guardseed, _can_escape_call |
5 | 5 | using Serialization
|
6 | 6 | using Distributed: RemoteException
|
7 | 7 |
|
@@ -212,7 +212,7 @@ let fails = @testset NoThrowTestSet begin
|
212 | 212 |
|
213 | 213 | let str = sprint(show, fails[8])
|
214 | 214 | @test occursin("Expression: (==)(1:2...)", str)
|
215 |
| - @test !occursin("Evaluated", str) |
| 215 | + @test occursin("Evaluated: 1 == 2", str) |
216 | 216 | end
|
217 | 217 |
|
218 | 218 | let str = sprint(show, fails[9])
|
@@ -286,7 +286,6 @@ let fails = @testset NoThrowTestSet begin
|
286 | 286 | end
|
287 | 287 |
|
288 | 288 | let str = sprint(show, fails[23])
|
289 |
| - @test !(:issetequal in Test.DISPLAY_FAILED) |
290 | 289 | @test occursin("Expression: issetequal(a, b)", str)
|
291 | 290 | @test occursin("Evaluated: issetequal([1, 2], [1, 3])", str)
|
292 | 291 | end
|
@@ -1794,30 +1793,13 @@ end
|
1794 | 1793 | end
|
1795 | 1794 | end
|
1796 | 1795 |
|
1797 |
| -@testset "_is_simple_function" begin |
1798 |
| - @test !_is_simple_call(:(f())) |
1799 |
| - @test _is_simple_call(:(f(x))) |
1800 |
| - @test _is_simple_call(:(f(x, y))) |
1801 |
| - @test !_is_simple_call(:(f(x, y, z))) |
1802 |
| - |
1803 |
| - @test !_is_simple_call(:(f(; x))) |
1804 |
| - @test !_is_simple_call(:(f(; x, y))) |
1805 |
| - @test !_is_simple_call(:(f(x=1))) |
1806 |
| - @test !_is_simple_call(:(f(x=1, y=2))) |
1807 |
| - |
1808 |
| - @test !_is_simple_call(:(f(x, y=1))) |
1809 |
| - @test !_is_simple_call(:(f(x; y=1))) |
1810 |
| - |
1811 |
| - @test !_is_simple_call(:(f(x...))) |
1812 |
| - @test !_is_simple_call(:(f(x, y...))) |
1813 |
| - @test !_is_simple_call(:(f(x; y...))) |
1814 |
| - |
1815 |
| - @test _is_simple_call(:(x == y)) |
1816 |
| - @test !_is_simple_call(:(x .== y)) |
1817 |
| -end |
| 1796 | +@testset "_can_escape_call" begin |
| 1797 | + @test !_can_escape_call(:(f())) |
| 1798 | + @test _can_escape_call(:(f(x))) |
| 1799 | + @test _can_escape_call(:(f(; x))) |
| 1800 | + @test _can_escape_call(:(f(x=1))) |
1818 | 1801 |
|
1819 |
| -@testset "_function_name" begin |
1820 |
| - @test _function_name(:(isequal(x, y))) === :isequal |
1821 |
| - @test _function_name(:(Base.isequal(x.y))) === :isequal |
1822 |
| - @test _function_name(:(Base.Meta.isexpr(ex))) === :isexpr |
| 1802 | + @test _can_escape_call(:(x == y)) |
| 1803 | + @test !_can_escape_call(:(x .== y)) |
| 1804 | + @test !_can_escape_call(:((==).(x, y))) |
1823 | 1805 | end
|
0 commit comments