ChaiScript/unittests/list_push_front.chai
2015-08-27 15:23:36 -06:00

14 lines
230 B
ChaiScript

load_module("stl_extra")
auto x = List()
x.push_front(3)
x.push_front("A")
assert_equal("A", x.front());
assert_equal(3, x.back());
// push_back newly constructed return value that's non-copyable
x.push_front(async(fun(){}))