Added throwing exception when saving untrained SVM model
This commit is contained in:
@@ -155,6 +155,14 @@ TEST(ML_RTrees, save_load) { CV_SLMLTest test( CV_RTREES ); test.safe_run(); }
|
||||
TEST(ML_ERTrees, save_load) { CV_SLMLTest test( CV_ERTREES ); test.safe_run(); }
|
||||
|
||||
|
||||
TEST(ML_SVM, throw_exception_when_save_untrained_model)
|
||||
{
|
||||
SVM svm;
|
||||
string filename = tempfile("svm.xml");
|
||||
ASSERT_THROW(svm.save(filename.c_str()), Exception);
|
||||
remove(filename.c_str());
|
||||
}
|
||||
|
||||
TEST(DISABLED_ML_SVM, linear_save_load)
|
||||
{
|
||||
CvSVM svm1, svm2, svm3;
|
||||
|
||||
Reference in New Issue
Block a user