![]() |
ENSDF++ 1.1
An easy, fast and simple way to run querys towards the ENSDF database, written in C++.
|
00001 #include "ENSDF_TEST.h" 00002 00003 bool ENSDF_TEST::ENSDF_CheckIfConstructsCorrectly_AssertTrue() const 00004 { 00005 ENSDF myENSDF(vector<string>()); 00006 return true; 00007 } 00008 00009 bool ENSDF_TEST::ENSDF_ReadsCorrectNumberOfIsotopes_AssertTrue() const 00010 { 00011 vector<string> myVector; 00012 myVector.push_back("ensdf.027"); 00013 ENSDF myENSDF(myVector); 00014 00015 Nukleid myNukleid(" 27AL"); 00016 00017 assert(myENSDF.getAllIsotopes().find(myNukleid)->second->getDatasets().size()==13); 00018 assert (myENSDF.getNumberOfIsotops()==9); 00019 return true; 00020 } 00021 00022 bool ENSDF_TEST::ENSDF_PassesDataCorrectlyToSubRoutines_AssertTrue() const 00023 { 00024 //27SI -> 12 datasets 00025 vector<string> myVector; 00026 myVector.push_back("ensdf.027"); 00027 ENSDF myENSDF(myVector); 00028 return true; 00029 } 00030 00031 int ENSDF_TEST::runUnitTests() const 00032 { 00033 cout << "Running unit tests on ENSDF..."; 00034 if(!ENSDF_CheckIfConstructsCorrectly_AssertTrue()) 00035 return 1; 00036 if(!ENSDF_ReadsCorrectNumberOfIsotopes_AssertTrue()) 00037 return 2; 00038 if(!ENSDF_PassesDataCorrectlyToSubRoutines_AssertTrue()) 00039 return 3; 00040 cout << "done" << endl; 00041 return 0; 00042 }