Skip to content

Commit

Permalink
Fix spelling errors (3) (#9869)
Browse files Browse the repository at this point in the history
* Fix spelling errors (3)

Similar to fixes done in #9844 and #9854.

This commit completes the review of all files in the repository.

* Fix spelling errors (3.1)

* Undo an incorrect word replacement.

Thanks @makenowjust for pointing it out in #9854.
  • Loading branch information
docelic authored Nov 6, 2020
1 parent 22dc762 commit 071596a
Show file tree
Hide file tree
Showing 103 changed files with 197 additions and 197 deletions.
2 changes: 1 addition & 1 deletion spec/compiler/codegen/alias_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe "Code gen: alias" do
))
end

it "lazyly solves aliases (#1346)" do
it "lazily solves aliases (#1346)" do
run(%(
class Session; end
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/arithmetics_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require "../../spec_helper"
}
{% end %}

describe "Code gen: arithmetics primitives" do
describe "Code gen: arithmetic primitives" do
describe "&+ addition" do
{% for type in SupportedInts %}
it "wrap around for {{type}}" do
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/class_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe "Code gen: class" do
").to_i.should eq(1)
end

it "codgens virtual method of generic class" do
it "codegens virtual method of generic class" do
run("
require \"char\"
Expand Down
4 changes: 2 additions & 2 deletions spec/compiler/codegen/def_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe "Code gen: def" do
")
end

it "codegens with and witout default arguments" do
it "codegens with and without default arguments" do
run("
def foo(x = 1)
x &+ 1
Expand All @@ -174,7 +174,7 @@ describe "Code gen: def" do
").to_i.should eq(5)
end

it "codegens with and witout many default arguments" do
it "codegens with and without many default arguments" do
run("
def foo(x = 1, y = 2, z = 3)
x &+ y &+ z
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/generic_class_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe "Code gen: generic class type" do
)).to_i.should eq(1)
end

it "codegens statis array size after instantiating" do
it "codegens static array size after instantiating" do
run(%(
struct StaticArray(T, N)
def size
Expand Down
4 changes: 2 additions & 2 deletions spec/compiler/codegen/lib_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe "Code gen: lib" do
")
end

it "allows passing type to LibC if it has a coverter with to_unsafe" do
it "allows passing type to LibC if it has a converter with to_unsafe" do
codegen("
lib LibC
fun foo(x : Int32) : Int32
Expand All @@ -42,7 +42,7 @@ describe "Code gen: lib" do
")
end

it "allows passing type to LibC if it has a coverter with to_unsafe (bug)" do
it "allows passing type to LibC if it has a converter with to_unsafe (bug)" do
codegen(%(
require "prelude"
Expand Down
6 changes: 3 additions & 3 deletions spec/compiler/codegen/macro_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ describe "Code gen: macro" do
)).to_string.should eq("Int32")
end

it "can acccess type variables of a module" do
it "can access type variables of a module" do
run(%(
module Foo(T)
def self.foo
Expand All @@ -589,7 +589,7 @@ describe "Code gen: macro" do
)).to_string.should eq("Int32")
end

it "can acccess type variables that are not types" do
it "can access type variables that are not types" do
run(%(
class Foo(T)
def foo
Expand All @@ -600,7 +600,7 @@ describe "Code gen: macro" do
)).to_b.should eq(true)
end

it "can acccess type variables of a tuple" do
it "can access type variables of a tuple" do
run(%(
struct Tuple
def foo
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/module_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ describe "Code gen: module" do
)).to_i.should eq(10)
end

it "codegend dispatch of union with module (#3647)" do
it "codegens dispatch of union with module (#3647)" do
run(%(
module Moo
end
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/named_tuple_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe "Code gen: named tuple" do
run(%(
ptr = Pointer({x: Int32, y: String}).malloc(1_u64)
# Here the compiler should reoder the values to match
# Here the compiler should reorder the values to match
# the type inside the pointer
ptr.value = {y: "hello", x: 42}
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/no_return_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe "Code gen: no return" do
run("Pointer(NoReturn).malloc(1_u64); 1").to_i.should eq(1)
end

it "codegens if with no reutrn and variable used afterwards" do
it "codegens if with no return and variable used afterwards" do
codegen(%(
require "prelude"
Expand Down
4 changes: 2 additions & 2 deletions spec/compiler/codegen/pointer_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe "Code gen: pointer" do
").to_i.should eq(1)
end

it "codgens pointer as if condition inside union (1)" do
it "codegens pointer as if condition inside union (1)" do
run(%(
ptr = Pointer(Int32).new(0_u64) || Pointer(Float64).new(0_u64)
if ptr
Expand All @@ -281,7 +281,7 @@ describe "Code gen: pointer" do
)).to_i.should eq(2)
end

it "codgens pointer as if condition inside union (2)" do
it "codegens pointer as if condition inside union (2)" do
run(%(
if 1 == 1
ptr = Pointer(Int32).new(0_u64)
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/previous_def_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe "codegen: previous_def" do
)).to_i.should eq(2)
end

it "codeges previous def when inside fun and forwards args" do
it "codegens previous def when inside fun and forwards args" do
run(%(
def foo(z)
z &+ 1
Expand Down
6 changes: 3 additions & 3 deletions spec/compiler/codegen/primitives_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe "Code gen: primitives" do
", inject_primitives: false).to_i.should eq(3)
end

it "codeges crystal_type_id with union type" do
it "codegens crystal_type_id with union type" do
run("
class Foo
end
Expand Down Expand Up @@ -221,10 +221,10 @@ describe "Code gen: primitives" do
it "uses built-in llvm function that returns a tuple" do
run(%(
lib Intrinsics
fun sadd_i32_with_overlow = "llvm.sadd.with.overflow.i32"(a : Int32, b : Int32) : {Int32, Bool}
fun sadd_i32_with_overflow = "llvm.sadd.with.overflow.i32"(a : Int32, b : Int32) : {Int32, Bool}
end
x, o = Intrinsics.sadd_i32_with_overlow(1, 2)
x, o = Intrinsics.sadd_i32_with_overflow(1, 2)
x
)).to_i.should eq(3)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/compiler/codegen/responds_to_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe "Codegen: responds_to?" do
run("class Reference; def foo; end; end; (1 == 2 ? nil : Reference.new).responds_to?(:foo)").to_b.should be_true
end

it "codegends responds_to? with generic class (1)" do
it "codegens responds_to? with generic class (1)" do
run(%(
class Foo(T)
def foo
Expand All @@ -40,7 +40,7 @@ describe "Codegen: responds_to?" do
)).to_b.should be_true
end

it "codegends responds_to? with generic class (2)" do
it "codegens responds_to? with generic class (2)" do
run(%(
class Foo(T)
def foo
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/struct_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ describe "Code gen: struct" do
").to_i.should eq(1)
end

it "allows assinging to struct argument (bug)" do
it "allows assigning to struct argument (bug)" do
run("
struct Foo
def bar
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/codegen/target_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe Crystal::Codegen::Target do
target.gnu?.should be_true
end

it "normalises triples" do
it "normalizes triples" do
Target.new("i686-unknown-linux-gnu").to_s.should eq("i386-unknown-linux-gnu")
Target.new("amd64-unknown-openbsd").to_s.should eq("x86_64-unknown-openbsd")
end
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/crystal/tools/playground_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private def assert_agent(source, expected)

instrument(source).should contain(expected)

# whatever case should work beforeit should work with appended lines
# whatever case should work before it should work with appended lines
instrument("#{source}\n1\n").should contain(expected)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/lexer/location_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe "Lexer: location" do
(loc3 == loc1).should be_true
end

it "locations with virtual files shoud be comparable" do
it "locations with virtual files should be comparable" do
loc1 = Location.new("file1", 1, 1)
loc2 = Location.new(VirtualFile.new(Macro.new("macro", [] of Arg, Nop.new), "", Location.new("f", 1, 1)), 2, 1)
(loc1 < loc2).should be_false
Expand Down
8 changes: 4 additions & 4 deletions spec/compiler/macro/macro_expander_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ describe "MacroExpander" do
assert_macro "", "1 + 2", [] of ASTNode, "1 + 2"
end

it "expands macro with string sustitution" do
it "expands macro with string substitution" do
assert_macro "x", "{{x}}", ["hello".string] of ASTNode, %("hello")
end

it "expands macro with symbol sustitution" do
it "expands macro with symbol substitution" do
assert_macro "x", "{{x}}", ["hello".symbol] of ASTNode, ":hello"
end

it "expands macro with argument-less call sustitution" do
it "expands macro with argument-less call substitution" do
assert_macro "x", "{{x}}", ["hello".call] of ASTNode, "hello"
end

Expand Down Expand Up @@ -61,7 +61,7 @@ describe "MacroExpander" do
assert_macro "", "{{ \"hello\#{1 == 1}world\" }}", [] of ASTNode, %("hellotrueworld")
end

it "expands macro with var sustitution" do
it "expands macro with var substitution" do
assert_macro "x", "{{x}}", ["hello".var] of ASTNode, "hello"
end

Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/macro/macro_methods_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ module Crystal
assert_macro "", "{{~1}}", [] of ASTNode, "-2"
end

it "exetutes kind" do
it "executes kind" do
assert_macro "", "{{-128i8.kind}}", [] of ASTNode, ":i8"
assert_macro "", "{{1e-123_f32.kind}}", [] of ASTNode, ":f32"
assert_macro "", "{{1.0.kind}}", [] of ASTNode, ":f64"
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/semantic/case_spec.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "../../spec_helper"

describe "semantic: case" do
it "doesn't check ehxaustiveness when using 'when'" do
it "doesn't check exhaustiveness when using 'when'" do
assert_no_errors %(
a = 1 || nil
case a
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/semantic/class_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ describe "Semantic: class" do
)) { int32 }
end

it "cant't use implicit initialize if defined in parent" do
it "can't use implicit initialize if defined in parent" do
assert_error %(
class Foo
def initialize(x)
Expand Down
4 changes: 2 additions & 2 deletions spec/compiler/semantic/closure_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ describe "Semantic: closure" do
") { proc_of(int32, float64) }
end

it "errors if forwaring block arg doesn't match input type" do
it "errors if forwarding block arg doesn't match input type" do
assert_error "
def foo(&block : Int32 -> U)
block
Expand All @@ -415,7 +415,7 @@ describe "Semantic: closure" do
"expected block argument's argument #1 to be Int32, not Int64"
end

it "errors if forwaring block arg doesn't match input type size" do
it "errors if forwarding block arg doesn't match input type size" do
assert_error "
def foo(&block : Int32, Int32 -> U)
block
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/semantic/concrete_types_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe "Semantic: concrete_types" do
class Bar < Base
end
)) do |t|
# abstract base class are required because the metaclass can allways be used: Base.method
# abstract base class are required because the metaclass can always be used: Base.method
{t["Base"].virtual_type.metaclass, [t["Base"].metaclass, t["Foo"].metaclass, t["Bar"].metaclass]}
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/semantic/const_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ describe "Semantic: const" do
"A is not a type, it's a constant"
end

it "errors if using const in unintialized" do
it "errors if using const in uninitialized" do
assert_error %(
A = 1
Expand Down
2 changes: 1 addition & 1 deletion spec/compiler/semantic/def_overload_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ describe "Semantic: def overload" do
") { int32 }
end

it "prefers more specifc overload than one with free variables" do
it "prefers more specific overload than one with free variables" do
assert_type("
require \"prelude\"
def foo(x : Array(T), y : T)
Expand Down
6 changes: 3 additions & 3 deletions spec/compiler/semantic/did_you_mean_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe "Semantic: did you mean" do
"If the variable was declared in a macro it's not visible outside it"
end

it "suggest that there might be a type for an initialize method" do
it "suggest that there might be a typo for an initialize method" do
assert_error %(
class Foo
def intialize(x)
Expand All @@ -195,7 +195,7 @@ describe "Semantic: did you mean" do
"do you maybe have a typo in this 'intialize' method?"
end

it "suggest that there might be a type for an initialize method in inherited class" do
it "suggest that there might be a typo for an initialize method in inherited class" do
assert_error %(
class Foo
def initialize
Expand All @@ -212,7 +212,7 @@ describe "Semantic: did you mean" do
"do you maybe have a typo in this 'intialize' method?"
end

it "suggest that there might be a type for an initialize method with overload" do
it "suggest that there might be a typo for an initialize method with overload" do
assert_error %(
class Foo
def initialize(x : Int32)
Expand Down
8 changes: 4 additions & 4 deletions spec/compiler/semantic/exception_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe "Semantic: exception" do
") { int32 }
end

it "types var as nialble if previously nilable (1)" do
it "types var as nilable if previously nilable (1)" do
assert_type("
if 1 == 2
a = 1
Expand All @@ -130,7 +130,7 @@ describe "Semantic: exception" do
") { nilable int32 }
end

it "types var as nialble if previously nilable (2)" do
it "types var as nilable if previously nilable (2)" do
assert_type("
if 1 == 2
a = 1
Expand All @@ -144,11 +144,11 @@ describe "Semantic: exception" do
") { nilable int32 }
end

it "errors if catched exception is not a subclass of Exception" do
it "errors if caught exception is not a subclass of Exception" do
assert_error "begin; rescue ex : Int32; end", "Int32 is not a subclass of Exception"
end

it "errors if catched exception is not a subclass of Exception without var" do
it "errors if caught exception is not a subclass of Exception without var" do
assert_error "begin; rescue Int32; end", "Int32 is not a subclass of Exception"
end

Expand Down
Loading

0 comments on commit 071596a

Please sign in to comment.