Skip to content

Commit

Permalink
use nimPreviewSlimSystem, test stdlib category
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Aug 19, 2022
1 parent 22d321a commit 257fd14
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/pure/asyncfutures.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import os, tables, strutils, times, heapqueue, options, deques, cstrutils

import system/stacktraces

when defined(nimPreviewSlimSystem):
import std/objectdollar # for StackTraceEntry

# TODO: This shouldn't need to be included, but should ideally be exported.
type
CallbackFunc = proc () {.closure, gcsafe.}
Expand Down
4 changes: 4 additions & 0 deletions lib/system/dollars.nim
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ proc `$`*[T: tuple](x: T): string =
## $() == "()"
tupleObjectDollar(result, x)

when not defined(nimPreviewSlimSystem):
import std/objectdollar
export objectdollar

proc collectionToString[T](x: T, prefix, separator, suffix: string): string =
result = prefix
var firstElement = true
Expand Down
3 changes: 3 additions & 0 deletions tests/stdlib/toptions.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ discard """

import std/[json, options]

when defined(nimPreviewSlimSystem):
import std/objectdollar


# RefPerson is used to test that overloaded `==` operator is not called by
# options. It is defined here in the global scope, because otherwise the test
Expand Down
3 changes: 3 additions & 0 deletions tests/stdlib/tstrformat.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import genericstrformat
import std/[strformat, strutils, times, tables, json]

when defined(nimPreviewSlimSystem):
import std/objectdollar

proc main() =
block: # issue #7632
doAssert works(5) == "formatted 5"
Expand Down

0 comments on commit 257fd14

Please sign in to comment.