From d4d34b9639ba2fa66f52aff422c34c60c080ab19 Mon Sep 17 00:00:00 2001 From: crazeteam <164632007+crazeteam@users.noreply.github.com> Date: Wed, 27 Mar 2024 08:44:31 +0800 Subject: [PATCH] chore: fix some comments (#53861) Signed-off-by: crazeteam --- base/sort.jl | 2 +- stdlib/LinearAlgebra/src/triangular.jl | 2 +- stdlib/REPL/test/repl.jl | 2 +- stdlib/Test/test/runtests.jl | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/base/sort.jl b/base/sort.jl index 281a75cac309e..38e89e3d3a0ce 100644 --- a/base/sort.jl +++ b/base/sort.jl @@ -528,7 +528,7 @@ no scratch space is present. A returned scratch space will be a `Vector{T}` where `T` is usually the eltype of `v`. There are some exceptions, for example if `eltype(v) == Union{Missing, T}` then the scratch space -may be be a `Vector{T}` due to `MissingOptimization` changing the eltype of `v` to `T`. +may be a `Vector{T}` due to `MissingOptimization` changing the eltype of `v` to `T`. `t` is an appropriate scratch space for the algorithm at hand, to be accessed as `t[i + offset]`. `t` is used for an algorithm to pass a scratch space back to itself in diff --git a/stdlib/LinearAlgebra/src/triangular.jl b/stdlib/LinearAlgebra/src/triangular.jl index aff87e3ae50ba..97ae07e12e979 100644 --- a/stdlib/LinearAlgebra/src/triangular.jl +++ b/stdlib/LinearAlgebra/src/triangular.jl @@ -2663,7 +2663,7 @@ end Bᵢⱼ⁽¹⁾ = M_Bᵢⱼ⁽¹⁾[1:s₁, 1:s₂] # Compute Bᵢⱼ⁽⁰⁾ and Bᵢⱼ⁽¹⁾ mul!(Bᵢⱼ⁽⁰⁾, A[i₁:i₂,k₁:k₂], A[k₁:k₂,j₁:j₂]) - # Retreive Rᵢ,ᵢ₊ₖ as A[i+k,i]' + # Retrieve Rᵢ,ᵢ₊ₖ as A[i+k,i]' mul!(Bᵢⱼ⁽¹⁾, A[i₁:i₂,k₁:k₂], A[j₁:j₂,k₁:k₂]') # Solve Uᵢ,ᵢ₊ₖ using Reference [1, (4.10)] kron!(L₀, Δ[1:s₂,1:s₂], S[1:s₁,i₁:i₂]) diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index 1d0caab7d0e57..09ff10e770e84 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -114,7 +114,7 @@ fake_repl() do stdin_write, stdout_read, repl Base.wait(repltask) end -# These are integration tests. If you want to unit test test e.g. completion, or +# These are integration tests. If you want to unit test e.g. completion, or # exact LineEdit behavior, put them in the appropriate test files. # Furthermore since we are emulating an entire terminal, there may be control characters # in the mix. If verification needs to be done, keep it to the bare minimum. Basically diff --git a/stdlib/Test/test/runtests.jl b/stdlib/Test/test/runtests.jl index 460e2eadf42b7..fc4838caf4ef4 100644 --- a/stdlib/Test/test/runtests.jl +++ b/stdlib/Test/test/runtests.jl @@ -162,7 +162,7 @@ let fails = @testset NoThrowTestSet begin @test_throws "A test" error("a test") @test_throws r"sqrt\([Cc]omplx" sqrt(-1) @test_throws str->occursin("a T", str) error("a test") - @test_throws ["BoundsError", "aquire", "1-element", "at index [2]"] [1][2] + @test_throws ["BoundsError", "acquire", "1-element", "at index [2]"] [1][2] end for fail in fails @test fail isa Test.Fail @@ -294,7 +294,7 @@ let fails = @testset NoThrowTestSet begin end let str = sprint(show, fails[26]) - @test occursin("Expected: [\"BoundsError\", \"aquire\", \"1-element\", \"at index [2]\"]", str) + @test occursin("Expected: [\"BoundsError\", \"acquire\", \"1-element\", \"at index [2]\"]", str) @test occursin(r"Message: \"BoundsError.* 1-element.*at index \[2\]", str) end