Skip to content

Instantly share code, notes, and snippets.

@karlnapf
Created August 20, 2013 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlnapf/6282793 to your computer and use it in GitHub Desktop.
Save karlnapf/6282793 to your computer and use it in GitHub Desktop.
Example how to debug/check clone unit tests
#include <shogun/base/SGObject.h>
#include <shogun/base/class_list.h>
using namespace shogun;
void test()
{
CSGObject* object = new_sgserializable("BaggingMachine", PT_NOT_GENERIC);
ASSERT(object != NULL);
CSGObject* clone = object->clone();
ASSERT(object->equals(clone));
SG_UNREF(object);
SG_UNREF(clone);
}
int main()
{
init_shogun_with_defaults();
sg_io->set_loglevel(MSG_DEBUG);
test();
exit_shogun();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment