diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arc/topt_cursor.nim | 2 | ||||
-rw-r--r-- | tests/generics/tgenerics_issues.nim | 6 | ||||
-rw-r--r-- | tests/iter/tclosureiters.nim | 2 | ||||
-rw-r--r-- | tests/manyloc/argument_parser/argument_parser.nim | 4 | ||||
-rw-r--r-- | tests/manyloc/keineschweine/dependencies/genpacket/streams_enh.nim | 4 | ||||
-rw-r--r-- | tests/stdlib/tmemlinesBuf.nim | 2 | ||||
-rw-r--r-- | tests/stdlib/tosproc.nim | 14 |
7 files changed, 17 insertions, 17 deletions
diff --git a/tests/arc/topt_cursor.nim b/tests/arc/topt_cursor.nim index a8020e72b..300402094 100644 --- a/tests/arc/topt_cursor.nim +++ b/tests/arc/topt_cursor.nim @@ -28,7 +28,7 @@ block :tmp: try: var res try: - res = TaintedString(newStringOfCap(80)) + res = newStringOfCap(80) block :tmp_1: while readLine(f, res): x_cursor = res diff --git a/tests/generics/tgenerics_issues.nim b/tests/generics/tgenerics_issues.nim index 365afd407..46b4c21c9 100644 --- a/tests/generics/tgenerics_issues.nim +++ b/tests/generics/tgenerics_issues.nim @@ -774,13 +774,13 @@ block: # issue #9458 Option[T] = object val: T has: bool - + Bar = object proc none(T: typedesc): Option[T] = discard - proc foo[T](self: T; x: Option[Bar] = Bar.none) = + proc foo[T](self: T; x: Option[Bar] = Bar.none) = discard foo(1) @@ -834,7 +834,7 @@ proc getBar(x: string): Bar = Bar(foo: none[seq[Foo]](), s: "") -proc fakeReadLine(): TaintedString = "hey" +proc fakeReadLine(): string = "hey" echo getBar(fakeReadLine()) # causes error diff --git a/tests/iter/tclosureiters.nim b/tests/iter/tclosureiters.nim index 0ee8e81cc..afeaabc7d 100644 --- a/tests/iter/tclosureiters.nim +++ b/tests/iter/tclosureiters.nim @@ -98,7 +98,7 @@ proc unused = iterator lineIter2*(filename: string): string {.closure.} = var f = open(filename, bufSize=8000) defer: close(f) # <-- commenting defer "solves" the problem - var res = TaintedString(newStringOfCap(80)) + var res = newStringOfCap(80) while f.readLine(res): yield res proc unusedB = diff --git a/tests/manyloc/argument_parser/argument_parser.nim b/tests/manyloc/argument_parser/argument_parser.nim index b9788a81d..e2c1b0a04 100644 --- a/tests/manyloc/argument_parser/argument_parser.nim +++ b/tests/manyloc/argument_parser/argument_parser.nim @@ -225,7 +225,7 @@ template raise_or_quit(exception, message: untyped) = template run_custom_proc(parsed_parameter: Tparsed_parameter, custom_validator: Tparameter_callback, - parameter: TaintedString) = + parameter: string) = ## Runs the custom validator if it is not nil. ## ## Pass in the string of the parameter triggering the call. If the @@ -318,7 +318,7 @@ proc echo_help*(expected: seq[Tparameter_specification] = @[], proc parse*(expected: seq[Tparameter_specification] = @[], - type_of_positional_parameters = PK_STRING, args: seq[TaintedString] = @[], + type_of_positional_parameters = PK_STRING, args: seq[string] = @[], bad_prefixes = @["-", "--"], end_of_options = "--", quit_on_failure = true): Tcommandline_results = ## Parses parameters and returns results. diff --git a/tests/manyloc/keineschweine/dependencies/genpacket/streams_enh.nim b/tests/manyloc/keineschweine/dependencies/genpacket/streams_enh.nim index ad0d20f1c..a0c8a7a3c 100644 --- a/tests/manyloc/keineschweine/dependencies/genpacket/streams_enh.nim +++ b/tests/manyloc/keineschweine/dependencies/genpacket/streams_enh.nim @@ -1,7 +1,7 @@ import streams from strutils import repeat -proc readPaddedStr*(s: PStream, length: int, padChar = '\0'): TaintedString = +proc readPaddedStr*(s: PStream, length: int, padChar = '\0'): string = var lastChr = length result = s.readStr(length) while lastChr >= 0 and result[lastChr - 1] == padChar: dec(lastChr) @@ -16,7 +16,7 @@ proc writePaddedStr*(s: PStream, str: string, length: int, padChar = '\0') = else: s.write(str) -proc readLEStr*(s: PStream): TaintedString = +proc readLEStr*(s: PStream): string = var len = s.readInt16() result = s.readStr(len) diff --git a/tests/stdlib/tmemlinesBuf.nim b/tests/stdlib/tmemlinesBuf.nim index 97ad751ee..ea607525d 100644 --- a/tests/stdlib/tmemlinesBuf.nim +++ b/tests/stdlib/tmemlinesBuf.nim @@ -5,7 +5,7 @@ disabled: "appveyor" import memfiles var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim") -var buffer: TaintedString = "" +var buffer: string = "" var lineCount = 0 for line in lines(inp, buffer): lineCount += 1 diff --git a/tests/stdlib/tosproc.nim b/tests/stdlib/tosproc.nim index ab8024746..96cff1468 100644 --- a/tests/stdlib/tosproc.nim +++ b/tests/stdlib/tosproc.nim @@ -195,15 +195,15 @@ else: # main driver # bugfix: windows stdin.close was a noop and led to blocking reads proc startProcessTest(command: string, options: set[ProcessOption] = { poStdErrToStdOut, poUsePath}, input = ""): tuple[ - output: TaintedString, + output: string, exitCode: int] {.tags: [ExecIOEffect, ReadIOEffect, RootEffect], gcsafe.} = var p = startProcess(command, options = options + {poEvalCommand}) var outp = outputStream(p) if input.len > 0: inputStream(p).write(input) close inputStream(p) - result = (TaintedString"", -1) - var line = newStringOfCap(120).TaintedString + result = ("", -1) + var line = newStringOfCap(120) while true: if outp.readLine(line): result[0].string.add(line.string) @@ -223,7 +223,7 @@ else: # main driver p.inputStream.flush() var line = "" var s: seq[string] - while p.outputStream.readLine(line.TaintedString): + while p.outputStream.readLine(line): s.add line doAssert s == @["10"] @@ -235,15 +235,15 @@ else: # main driver deferScoped: p.close() do: var sout: seq[string] - while p.outputStream.readLine(x.TaintedString): sout.add x + while p.outputStream.readLine(x): sout.add x doAssert sout == @["start ta_out", "to stdout", "to stdout", "to stderr", "to stderr", "to stdout", "to stdout", "end ta_out"] block: # startProcess stderr (replaces old test `tstderr` + `ta_out`) var p = startProcess(output, dir, options={}) deferScoped: p.close() do: var serr, sout: seq[string] - while p.errorStream.readLine(x.TaintedString): serr.add x - while p.outputStream.readLine(x.TaintedString): sout.add x + while p.errorStream.readLine(x): serr.add x + while p.outputStream.readLine(x): sout.add x doAssert serr == @["to stderr", "to stderr"] doAssert sout == @["start ta_out", "to stdout", "to stdout", "to stdout", "to stdout", "end ta_out"] |