Fix spellings (#12277) [backport]
This commit is contained in:
parent
9dd297f613
commit
39290cf88c
110 changed files with 166 additions and 166 deletions
|
|
@ -24,7 +24,7 @@ type
|
|||
|
||||
echo("")
|
||||
|
||||
# NOTE: when entering newlines, adjust `expectedEnd` ouptuts
|
||||
# NOTE: when entering newlines, adjust `expectedEnd` outputs
|
||||
|
||||
try:
|
||||
doAssert(false, "msg1") # doAssert test
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ discard """
|
|||
action: compile
|
||||
"""
|
||||
|
||||
# this test should ensure that the AST doesn't change slighly without it getting noticed.
|
||||
# this test should ensure that the AST doesn't change slightly without it getting noticed.
|
||||
|
||||
import ../ast_pattern_matching
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ template expectNimNode(arg: untyped): NimNode = arg
|
|||
## type `NimNode`.
|
||||
|
||||
proc substitudeComments(symbols, values, n: NimNode): NimNode =
|
||||
## substitudes all nodes of kind nnkCommentStmt to parameter
|
||||
## substitutes all nodes of kind nnkCommentStmt to parameter
|
||||
## symbols. Consumes the argument `n`.
|
||||
if n.kind == nnkCommentStmt:
|
||||
values.add newCall(bindSym"newCommentStmtNode", newLit(n.strVal))
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import
|
|||
nativesockets, os, asyncdispatch
|
||||
|
||||
proc setupServerSocket(hostname: string, port: Port, domain: Domain): AsyncFD =
|
||||
## Creates a socket, binds it to the specified address, and starts listening for connecitons.
|
||||
## Creates a socket, binds it to the specified address, and starts listening for connections.
|
||||
## Registers the descriptor with the dispatcher of the current thread
|
||||
## Raises OSError in case of an error.
|
||||
let fd = newNativeSocket(domain)
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ block tcasestm:
|
|||
of "N": false
|
||||
else:
|
||||
echo "no good"
|
||||
quit("quiting")
|
||||
quit("quitting")
|
||||
|
||||
proc toBool(s: string): bool =
|
||||
case s:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
|
||||
proc addFloats*(x, y, z: float): float =
|
||||
discard "implementation overriden by tcompilerapi.nim"
|
||||
discard "implementation overridden by tcompilerapi.nim"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ for j, y in stepIt(2.0, -0.0375 * 4, 107 div 4):
|
|||
errors += 1
|
||||
row.add(c)
|
||||
|
||||
# Printing aparently makes the test fail when joined.
|
||||
# Printing apparently makes the test fail when joined.
|
||||
# echo row
|
||||
|
||||
doAssert errors < 10, "total errors: " & $errors
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ vcat.x = "cat value"
|
|||
reject:
|
||||
vcat = vdog
|
||||
|
||||
# XXX: The next two cases seem incosistent, perhaps we should change the rules
|
||||
# XXX: The next two cases seem inconsistent, perhaps we should change the rules
|
||||
accept:
|
||||
# truncating copies are allowed
|
||||
var vanimal: Animal = vdog
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ test:
|
|||
|
||||
macro test2*(a: untyped): untyped =
|
||||
proc testproc(recurse: int) =
|
||||
echo "Thats weird"
|
||||
echo "That's weird"
|
||||
var o : NimNode = nil
|
||||
echo " no its not!"
|
||||
o = newNimNode(nnkNone)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ template overloadedTemplate(x: string) =
|
|||
"""
|
||||
|
||||
inspectUntyped bindSym("overloadedTemplate"), """bindSym("overloadedTemplate")"""
|
||||
# binSym is active only in the presense of `typed` params.
|
||||
# binSym is active only in the presence of `typed` params.
|
||||
# `untyped` params still get the raw AST
|
||||
|
||||
inspectSymbol normalProc, """
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ proc removeCollisionHandler*(space: PSpace; a: TCollisionType;
|
|||
#/ If the shape is attached to a static body, it will be added as a static shape.
|
||||
proc addShape*(space: PSpace; shape: PShape): PShape{.
|
||||
cdecl, importc: "cpSpaceAddShape", dynlib: Lib.}
|
||||
#/ Explicity add a shape as a static shape to the simulation.
|
||||
#/ Explicitly add a shape as a static shape to the simulation.
|
||||
proc addStaticShape*(space: PSpace; shape: PShape): PShape{.
|
||||
cdecl, importc: "cpSpaceAddStaticShape", dynlib: Lib.}
|
||||
#/ Add a rigid body to the simulation.
|
||||
|
|
@ -1028,12 +1028,12 @@ proc getCircleRadius*(shape: PShape): CpFloat {.
|
|||
proc allocPolyShape*(): PPolyShape {.
|
||||
cdecl, importc: "cpPolyShapeAlloc", dynlib: Lib.}
|
||||
#/ Initialize a polygon shape.
|
||||
#/ A convex hull will be created from the vertexes.
|
||||
#/ A convex hull will be created from the vertices.
|
||||
proc init*(poly: PPolyShape; body: PBody, numVerts: cint;
|
||||
verts: ptr TVector; offset: TVector): PPolyShape {.
|
||||
cdecl, importc: "cpPolyShapeInit", dynlib: Lib.}
|
||||
#/ Allocate and initialize a polygon shape.
|
||||
#/ A convex hull will be created from the vertexes.
|
||||
#/ A convex hull will be created from the vertices.
|
||||
proc newPolyShape*(body: PBody; numVerts: cint; verts: ptr TVector;
|
||||
offset: TVector): PShape {.
|
||||
cdecl, importc: "cpPolyShapeNew", dynlib: Lib.}
|
||||
|
|
@ -1050,7 +1050,7 @@ proc newBoxShape*(body: PBody; width, height: CpFloat): PShape {.
|
|||
proc newBoxShape*(body: PBody; box: TBB): PShape {.
|
||||
cdecl, importc: "cpBoxShapeNew2", dynlib: Lib.}
|
||||
|
||||
#/ Check that a set of vertexes is convex and has a clockwise winding.
|
||||
#/ Check that a set of vertices is convex and has a clockwise winding.
|
||||
#/ NOTE: Due to floating point precision issues, hulls created with cpQuickHull() are not guaranteed to validate!
|
||||
proc validatePoly*(verts: ptr TVector; numVerts: cint): bool {.
|
||||
cdecl, importc: "cpPolyValidate", dynlib: Lib.}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ proc setConnected(state: bool) =
|
|||
for b in connectionButtons: disable(b)
|
||||
|
||||
proc setActiveZone(ind: int; zone: ScZoneRecord) =
|
||||
#hilight it or something
|
||||
#highlight it or something
|
||||
dispmessage("Selected " & zone.name)
|
||||
connectZone(zone.ip, zone.port)
|
||||
playBtn.enable()
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ proc t6*(x: type(t3(0))): type(t1(0)) =
|
|||
proc t7*(x: int): type($x) =
|
||||
result = "test"
|
||||
|
||||
# This is a more compicated example involving a type
|
||||
# This is a more complicated example involving a type
|
||||
# selection through a macro:
|
||||
# https://github.com/nim-lang/Nim/issues/7230
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ proc `+!!`(p: pointer, size: int): pointer {.inline.} =
|
|||
|
||||
const
|
||||
PageShift = when defined(cpu16): 8 else: 12 # \
|
||||
# my tests showed no improvments for using larger page sizes.
|
||||
# my tests showed no improvements for using larger page sizes.
|
||||
PageSize = 1 shl PageShift
|
||||
|
||||
var p = osAllocPages(3 * PageSize)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ type
|
|||
foo: ref int
|
||||
bar: ref int not nil
|
||||
var x: ref int = new(int)
|
||||
# Create instance without initializaing the `bar` field
|
||||
# Create instance without initializing the `bar` field
|
||||
var f = Foo(foo: x)
|
||||
echo f.bar.isNil # true
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ TFoo
|
|||
'''
|
||||
"""
|
||||
|
||||
## XXX this output needs to be adapated for VCC which produces different results.
|
||||
## XXX this output needs to be adapted for VCC which produces different results.
|
||||
|
||||
# It turned out that it's hard to generate correct for these two test cases at
|
||||
# the same time.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import os, strutils
|
|||
# 8 - Handle : Invalid Handle
|
||||
|
||||
proc genBadFileName(limit = 100): string =
|
||||
## Generates a filename of a nonexistant file.
|
||||
## Generates a filename of a nonexistent file.
|
||||
## Returns "" if generation fails.
|
||||
result = "a"
|
||||
var hitLimit = true
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ when true:
|
|||
doAssert result.other == node["other"].getBiggestInt()
|
||||
|
||||
# TODO: Test object variant with set in of branch.
|
||||
# TODO: Should we support heterogenous arrays?
|
||||
# TODO: Should we support heterogeneous arrays?
|
||||
|
||||
# Tests that verify the error messages for invalid data.
|
||||
block:
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ when defined(case_testfile): # compiled test file for child process
|
|||
# failed. The shell (and lldb debugger) solves that by inserting a
|
||||
# helpful msg: `segmentation fault` when it detects a signal killed
|
||||
# the child.
|
||||
# todo: expose an API that will show more diagnostic, returing
|
||||
# todo: expose an API that will show more diagnostic, returning
|
||||
# (exitCode, signal) instead of just `shellExitCode`.
|
||||
if true: quit(139)
|
||||
of "exit_recursion": # stack overflow by infinite recursion
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ discard """
|
|||
outputsub: ""
|
||||
"""
|
||||
|
||||
# output not testable because repr prints pointer adresses
|
||||
# output not testable because repr prints pointer addresses
|
||||
# test the new "repr" built-in proc
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ template runTimezoneTests() =
|
|||
|
||||
# Bug with parse not setting DST properly if the current local DST differs from
|
||||
# the date being parsed. Need to test parse dates both in and out of DST. We
|
||||
# are testing that be relying on the fact that tranforming a TimeInfo to a Time
|
||||
# are testing that be relying on the fact that transforming a TimeInfo to a Time
|
||||
# and back again will correctly set the DST value. With the incorrect parse
|
||||
# behavior this will introduce a one hour offset from the named time and the
|
||||
# parsed time if the DST value differs between the current time and the date we
|
||||
|
|
@ -155,7 +155,7 @@ suite "ttimes":
|
|||
# impossible time period
|
||||
check initDateTime(26, mMar, 2017, 02, 30, 00).format(f) ==
|
||||
"2017-03-26 03:30 +02:00"
|
||||
# In case of an ambiguous time, the earlier time is choosen
|
||||
# In case of an ambiguous time, the earlier time is chosen
|
||||
check initDateTime(29, mOct, 2017, 02, 00, 00).format(f) ==
|
||||
"2017-10-29 02:00 +02:00"
|
||||
# These are just dates on either side of the dst switch
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ proc parse_until_symbol(node: NimNode, value: string, index: var int): bool {.co
|
|||
|
||||
|
||||
proc parse_template(node: NimNode, value: string) =
|
||||
## Parses through entire template, outputing valid
|
||||
## Parses through entire template, outputting valid
|
||||
## Nim code into the input `node` AST.
|
||||
var index = 0
|
||||
while index < value.len and
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ type
|
|||
precision: int ## floating point precision
|
||||
width: int ## minimal width
|
||||
fill: string ## the fill character, UTF8
|
||||
align: FmtAlign ## aligment
|
||||
align: FmtAlign ## alignment
|
||||
sign: FmtSign ## sign notation
|
||||
baseprefix: bool ## whether binary, octal, hex should be prefixed by 0b, 0x, 0o
|
||||
upcase: bool ## upper case letters in hex or exponential formats
|
||||
|
|
@ -207,7 +207,7 @@ proc writefill(o: var Writer; fmt: Format; n: int; signum: int = 0) =
|
|||
## `add`
|
||||
## output function
|
||||
## `fmt`
|
||||
## format to be used (important for padding aligment)
|
||||
## format to be used (important for padding alignment)
|
||||
## `n`
|
||||
## the number of filling characters to be written
|
||||
## `signum`
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ proc test_float32_castB() =
|
|||
doAssert b == -1024049152
|
||||
doAssert cast[uint64](b) == 18446744072685502464'u64
|
||||
doAssert c == 3270918144'u32
|
||||
# ensure the unsused bits in the internal representation don't have
|
||||
# ensure the unused bits in the internal representation don't have
|
||||
# any surprising content.
|
||||
doAssert cast[uint64](c) == 3270918144'u64
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue