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

Version Path
rice2-2.2.1 test/test_Address_Registration_Guard.cpp
rice2-2.2.0 test/test_Address_Registration_Guard.cpp
rice-2.2.0 test/test_Address_Registration_Guard.cpp
rice-2.1.3 test/test_Address_Registration_Guard.cpp
rice-2.1.2 test/test_Address_Registration_Guard.cpp
rice-2.1.1 test/test_Address_Registration_Guard.cpp
rice-2.1.0 test/test_Address_Registration_Guard.cpp
rice-2.0.0 test/test_Address_Registration_Guard.cpp
rice-1.7.0 test/test_Address_Registration_Guard.cpp
rice-1.6.3 test/test_Address_Registration_Guard.cpp
jameskilton-rice-1.2.0 test/test_Address_Registration_Guard.cpp
rice-1.6.2 test/test_Address_Registration_Guard.cpp
rice-1.6.1 test/test_Address_Registration_Guard.cpp
rice-1.6.0 test/test_Address_Registration_Guard.cpp
rice-1.6.0.pre test/test_Address_Registration_Guard.cpp
rice-1.5.3 test/test_Address_Registration_Guard.cpp
rice-1.5.2 test/test_Address_Registration_Guard.cpp
keyme-rice-1.5.1.keyme1 test/test_Address_Registration_Guard.cpp
keyme-rice-1.5.1.keyme test/test_Address_Registration_Guard.cpp
rice-1.5.1 test/test_Address_Registration_Guard.cpp