summary refs log tree commit diff stats
path: root/tests/stdlib/tsetutils.nim
blob: d99807f925372fc5ab878cfab86f855981e0d963 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  targets: "c js"
"""
import std/setutils

template main =
  doAssert "abcbb".toSet == {'a', 'b', 'c'}
  doAssert toSet([10u8, 12, 13]) == {10u8, 12, 13}
  doAssert toSet(0u16..30) == {0u16..30}
  type A = distinct char
  doAssert [A('x')].toSet == {A('x')}
  
main()
static: main()