From 2663b7e8e27e70d9449416f7e2dc179dbab6377e Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 23 Jan 2016 11:15:32 +0000 Subject: [PATCH] Added second set of tests for ProcessTextVectorsTests --- source/tests/xestiacalendar_commonfunctions.h | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/source/tests/xestiacalendar_commonfunctions.h b/source/tests/xestiacalendar_commonfunctions.h index 62a8aee..c598eb4 100644 --- a/source/tests/xestiacalendar_commonfunctions.h +++ b/source/tests/xestiacalendar_commonfunctions.h @@ -14,8 +14,7 @@ TEST(CommonFunctions, ProcessTextVectorsTests){ vector TextPropertiesExample1; vector TextValueExample1; - //multimap TextExample1Results; - multimap TextExample1TestResult1; + multimap TextExample1TestResult; TextPropertiesExample1.push_back("ATTENDEE"); TextValueExample1.push_back("Example Attendee 1"); @@ -25,11 +24,27 @@ TEST(CommonFunctions, ProcessTextVectorsTests){ TextPropertiesExample1.push_back("ATTENDEE"); TextValueExample1.push_back("Example Attendee 3"); + + TextPropertiesExample1.push_back("CATEGORIES"); + TextValueExample1.push_back("CATEGORY 1"); + + TextPropertiesExample1.push_back("CATEGORIES"); + TextValueExample1.push_back("CATEGORY 2"); + + TextPropertiesExample1.push_back("CATEGORIES"); + TextValueExample1.push_back("CATEGORY 3"); - TextExample1TestResult1.insert(make_pair("ATTENDEE", "Example Attendee 1")); - TextExample1TestResult1.insert(make_pair("ATTENDEE", "Example Attendee 2")); - TextExample1TestResult1.insert(make_pair("ATTENDEE", "Example Attendee 3")); + TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1")); + TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 2")); + TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 3")); - ASSERT_EQ(TextExample1TestResult1, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "ATTENDEE")); + ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "ATTENDEE")); + + TextExample1TestResult.clear(); + TextExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 1")); + TextExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 2")); + TextExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 3")); + + ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "CATEGORIES")); } \ No newline at end of file -- 2.39.5