comparison UnitTestsSources/UnitTestsMain.cpp @ 2646:740983056f9e jobs

StringToJobState
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 31 May 2018 17:30:22 +0200
parents 9f325c631973
children 0d8b753317b2
comparison
equal deleted inserted replaced
2644:5b3bfdf6b790 2646:740983056f9e
675 ValueRepresentation vr = static_cast<ValueRepresentation>(i); 675 ValueRepresentation vr = static_cast<ValueRepresentation>(i);
676 ASSERT_EQ(vr, StringToValueRepresentation(EnumerationToString(vr), true)); 676 ASSERT_EQ(vr, StringToValueRepresentation(EnumerationToString(vr), true));
677 } 677 }
678 678
679 ASSERT_THROW(StringToValueRepresentation("nope", true), OrthancException); 679 ASSERT_THROW(StringToValueRepresentation("nope", true), OrthancException);
680
681 ASSERT_EQ(JobState_Pending, StringToJobState(EnumerationToString(JobState_Pending)));
682 ASSERT_EQ(JobState_Running, StringToJobState(EnumerationToString(JobState_Running)));
683 ASSERT_EQ(JobState_Success, StringToJobState(EnumerationToString(JobState_Success)));
684 ASSERT_EQ(JobState_Failure, StringToJobState(EnumerationToString(JobState_Failure)));
685 ASSERT_EQ(JobState_Paused, StringToJobState(EnumerationToString(JobState_Paused)));
686 ASSERT_EQ(JobState_Retry, StringToJobState(EnumerationToString(JobState_Retry)));
687 ASSERT_THROW(StringToJobState("nope"), OrthancException);
680 } 688 }
681 689
682 690
683 691
684 #if defined(__linux__) || defined(__OpenBSD__) 692 #if defined(__linux__) || defined(__OpenBSD__)