Sha256: 7bd1ef645318c5d2e2e27485030686c7712eb8b52e40a515f9a6b1431739f6ae
Contents?: true
Size: 730 Bytes
Versions: 37
Compression:
Stored size: 730 Bytes
Contents
#include "unittest.hpp" #include "rice/Address_Registration_Guard.hpp" using namespace Rice; TESTSUITE(Address_Registration_Guard); SETUP(Address_Registration_Guard) { ruby_init(); } TESTCASE(register_address) { VALUE v = Qnil; Address_Registration_Guard g(&v); } TESTCASE(register_object) { Object o; Address_Registration_Guard g(&o); } TESTCASE(get_address) { VALUE v = Qnil; Address_Registration_Guard g(&v); ASSERT_EQUAL(&v, g.address()); } TESTCASE(swap) { VALUE v = Qnil; VALUE v2 = Qnil; Address_Registration_Guard g(&v); Address_Registration_Guard g2(&v2); g.swap(g2); ASSERT_EQUAL(&v, g2.address()); ASSERT_EQUAL(&v2, g.address()); // TODO: ensure addresses are still registered }
Version data entries
37 entries across 37 versions & 6 rubygems