Created
August 20, 2013 15:15
-
-
Save karlnapf/6282793 to your computer and use it in GitHub Desktop.
Example how to debug/check clone unit tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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