-// Copyright (C) 2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2015-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
vtkTable* table = vtkTable::New();
Parser->SetFileName(s.c_str());
bool expected_exception_thrown = false;
- try{
- Parser->Parse(table);
- } catch(vtkJSONException e) {
- expected_exception_thrown = true;
- }
+ CPPUNIT_ASSERT_THROW(Parser->Parse(table), vtkJSONException);
+// try{
+// ;
+// } catch(vtkJSONException e) {
+// expected_exception_thrown = true;
+// }
Parser->Delete();
table->Delete();
- if(!expected_exception_thrown) {
- CPPUNIT_FAIL("Expected exception is not thrown !!! ");
- }
+// if(!expected_exception_thrown) {
+// CPPUNIT_FAIL("Expected exception is not thrown !!! ");
+// }
}
}
vtkJSONParser* Parser = vtkJSONParser::New();
vtkTable* table = vtkTable::New();
Parser->SetFileName(s.c_str());
- bool exception_thrown = false;
- try{
+// bool exception_thrown = false;
+// try{
Parser->Parse(table);
- } catch(vtkJSONException e) {
- exception_thrown = true;
- }
+// } catch(vtkJSONException e) {
+// exception_thrown = true;
+// }
Parser->Delete();
table->Delete();
- if(exception_thrown) {
- CPPUNIT_FAIL("Unexpected exception has been thrown !!! ");
- }
+// if(exception_thrown) {
+// CPPUNIT_FAIL("Unexpected exception has been thrown !!! ");
+// }
}
vtkJSONParser* Parser = vtkJSONParser::New();
s += "_wo_metadata.json";
Parser->SetFileName(s.c_str());
bool exception_thrown = false;
- try{
+// try{
Parser->Parse(table);
- } catch(vtkJSONException e) {
- exception_thrown = true;
- }
- if(exception_thrown) {
- CPPUNIT_FAIL("Unexpected exception has been thrown !!! ");
- }
+// } catch(vtkJSONException e) {
+// exception_thrown = true;
+// }
+// if(exception_thrown) {
+// CPPUNIT_FAIL("Unexpected exception has been thrown !!! ");
+// }
double v = table->GetValue(2,0).ToDouble();
double v1 = table->GetValue(2,1).ToDouble();