Skip to content

Commit a09863b

Browse files
authored
Merge branch 'master' into test_for_no_invalidations
2 parents 76afd4d + 3360a44 commit a09863b

File tree

27 files changed

+362
-215
lines changed

27 files changed

+362
-215
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,11 @@ please remove the `backport-X.Y` tag from the originating pull request for the c
345345

346346
#### General Formatting Guidelines for Julia code contributions
347347

348-
- 4 spaces per indentation level, no tabs
348+
- Follow the latest dev version of [Julia Style Guide](https://docs.julialang.org/en/v1/manual/style-guide/).
349349
- use whitespace to make the code more readable
350350
- no whitespace at the end of a line (trailing whitespace)
351351
- comments are good, especially when they explain the algorithm
352352
- try to adhere to a 92 character line length limit
353-
- use upper camel case convention for modules, type names
354-
- use lower case with underscores for method names
355353
- it is generally preferred to use ASCII operators and identifiers over
356354
Unicode equivalents whenever possible
357355
- in docstrings refer to the language as "Julia" and the executable as "`julia`"

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Standard library changes
4040

4141
#### Test
4242

43+
* Test failures when using the `@test` macro now show evaluated arguments for all function calls ([#57825], [#57839]).
44+
4345
#### InteractiveUtils
4446

4547
External dependencies

base/abstractdict.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ But `keys(a)`, `values(a)` and `pairs(a)` all iterate `a`
144144
and return the elements in the same order.
145145
146146
# Examples
147-
```jldoctest
147+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
148148
julia> a = Dict(zip(["a", "b", "c"], [1, 2, 3]))
149149
Dict{String, Int64} with 3 entries:
150150
"c" => 3
@@ -207,7 +207,7 @@ Update collection with pairs from the other collections.
207207
See also [`merge`](@ref).
208208
209209
# Examples
210-
```jldoctest
210+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
211211
julia> d1 = Dict(1 => 2, 3 => 4);
212212
213213
julia> d2 = Dict(1 => 4, 4 => 5);
@@ -251,7 +251,7 @@ compatibility.
251251
`mergewith!` requires Julia 1.5 or later.
252252
253253
# Examples
254-
```jldoctest
254+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
255255
julia> d1 = Dict(1 => 2, 3 => 4);
256256
257257
julia> d2 = Dict(1 => 4, 4 => 5);
@@ -425,7 +425,7 @@ Update `d`, removing elements for which `f` is `false`.
425425
The function `f` is passed `key=>value` pairs.
426426
427427
# Examples
428-
```jldoctest
428+
```jldoctest; filter = r"^\\s+\\d\\s+=>\\s+\\S+\$"m
429429
julia> d = Dict(1=>"a", 2=>"b", 3=>"c")
430430
Dict{Int64, String} with 3 entries:
431431
2 => "b"
@@ -467,7 +467,7 @@ Return a copy of `d`, removing elements for which `f` is `false`.
467467
The function `f` is passed `key=>value` pairs.
468468
469469
# Examples
470-
```jldoctest
470+
```jldoctest; filter = r"^\\s+\\d\\s+=>\\s+\\S+\$"m
471471
julia> d = Dict(1=>"a", 2=>"b")
472472
Dict{Int64, String} with 2 entries:
473473
2 => "b"
@@ -660,7 +660,7 @@ of `dict` then it will be converted to the value type if possible and otherwise
660660
`map!(f, values(dict::AbstractDict))` requires Julia 1.2 or later.
661661
662662
# Examples
663-
```jldoctest
663+
```jldoctest; filter = r"^\\s+\\S+(\\s+=>\\s+\\d)?\$"m
664664
julia> d = Dict(:a => 1, :b => 2)
665665
Dict{Symbol, Int64} with 2 entries:
666666
:a => 1

base/abstractset.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This is an infix operator, allowing `s ∪ itr`.
2525
See also [`unique`](@ref), [`intersect`](@ref), [`isdisjoint`](@ref), [`vcat`](@ref), [`Iterators.flatten`](@ref).
2626
2727
# Examples
28-
```jldoctest
28+
```jldoctest; filter = r"^\\s+\\d\$"m
2929
julia> union([1, 2], [3])
3030
3-element Vector{Int64}:
3131
1
@@ -68,7 +68,7 @@ Maintain order with arrays.
6868
$(_DOCS_ALIASING_WARNING)
6969
7070
# Examples
71-
```jldoctest
71+
```jldoctest; filter = r"^\\s+\\d\$"m
7272
julia> a = Set([3, 4, 5]);
7373
7474
julia> union!(a, 1:2:7);

base/array.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ Retrieve the value(s) stored at the given key or index within a collection. The
911911
See also [`get`](@ref), [`keys`](@ref), [`eachindex`](@ref).
912912
913913
# Examples
914-
```jldoctest
914+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
915915
julia> A = Dict("a" => 1, "b" => 2)
916916
Dict{String, Int64} with 2 entries:
917917
"b" => 2
@@ -967,7 +967,7 @@ Store the given value at the given key or index within a collection. The syntax
967967
x` is converted by the compiler to `(setindex!(a, x, i, j, ...); x)`.
968968
969969
# Examples
970-
```jldoctest
970+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
971971
julia> a = Dict("a"=>1)
972972
Dict{String, Int64} with 1 entry:
973973
"a" => 1

base/cmd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ julia> run(cm)
504504
Process(`echo 1`, ProcessExited(0))
505505
```
506506
"""
507-
macro cmd(str)
507+
macro cmd(str::String)
508508
cmd_ex = shell_parse(str, special=shell_special, filename=String(__source__.file))[1]
509509
return :(cmd_gen($(esc(cmd_ex))))
510510
end

base/dict.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Given a single iterable argument, constructs a [`Dict`](@ref) whose key-value pa
3838
are taken from 2-tuples `(key,value)` generated by the argument.
3939
4040
# Examples
41-
```jldoctest
41+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
4242
julia> Dict([("A", 1), ("B", 2)])
4343
Dict{String, Int64} with 2 entries:
4444
"B" => 2
@@ -47,7 +47,7 @@ Dict{String, Int64} with 2 entries:
4747
4848
Alternatively, a sequence of pair arguments may be passed.
4949
50-
```jldoctest
50+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
5151
julia> Dict("A"=>1, "B"=>2)
5252
Dict{String, Int64} with 2 entries:
5353
"B" => 2
@@ -205,7 +205,7 @@ end
205205
Remove all elements from a `collection`.
206206
207207
# Examples
208-
```jldoctest
208+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
209209
julia> A = Dict("a" => 1, "b" => 2)
210210
Dict{String, Int64} with 2 entries:
211211
"b" => 2
@@ -389,7 +389,7 @@ Return the value stored for the given key, or if no mapping for the key is prese
389389
`key => default`, and return `default`.
390390
391391
# Examples
392-
```jldoctest
392+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
393393
julia> d = Dict("a"=>1, "b"=>2, "c"=>3);
394394
395395
julia> get!(d, "a", 5)
@@ -654,7 +654,7 @@ end
654654
Delete the mapping for the given key in a collection, if any, and return the collection.
655655
656656
# Examples
657-
```jldoctest
657+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
658658
julia> d = Dict("a"=>1, "b"=>2)
659659
Dict{String, Int64} with 2 entries:
660660
"b" => 2

base/essentials.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ This function simply returns its argument by default, since the elements
11151115
of a general iterator are normally considered its "values".
11161116
11171117
# Examples
1118-
```jldoctest
1118+
```jldoctest; filter = r"^\\s+\\d\$"m
11191119
julia> d = Dict("a"=>1, "b"=>2);
11201120
11211121
julia> values(d)

base/float.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ See also [`trunc`](@ref).
406406
julia> unsafe_trunc(Int, -2.2)
407407
-2
408408
409-
julia> unsafe_trunc(Int, NaN)
410-
-9223372036854775808
409+
julia> unsafe_trunc(Int, NaN) isa Int
410+
true
411411
```
412412
"""
413413
function unsafe_trunc end

base/hashing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Typically, any type that implements `hash` should also implement its own [`==`](
1515
1616
The hash value may change when a new Julia process is started.
1717
18-
```jldoctest
18+
```jldoctest; filter = r"0x[0-9a-f]{16}"
1919
julia> a = hash(10)
2020
0x95ea2955abd45275
2121

0 commit comments

Comments
 (0)