local g = name_generator("tst")
assert(g:next() == name("tst", 0))
assert(g:next() == name("tst", 1))
assert(g:prefix() == name("tst"))
local cg = g:mk_child()
assert(cg:prefix() == name("tst", 2))
assert(cg:next() == name("tst", 2, 0))
assert(cg:next() == name("tst", 2, 1))
assert(cg:next() == name("tst", 2, 2))
assert(g:next() == name("tst", 3))
assert(is_name_generator(g))