/[debian]/mimetic/branches/upstream/current/test/t.fieldparam.cxx
ViewVC logotype

Contents of /mimetic/branches/upstream/current/test/t.fieldparam.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1729 - (show annotations)
Fri May 15 15:30:29 2009 UTC (12 years, 2 months ago) by gregoa
File size: 903 byte(s)
[svn-upgrade] Integrating new upstream version, mimetic (0.9.6)
1 #include "t.fieldparam.h"
2 #include <string>
3
4 namespace mimetic
5 {
6 using namespace std;
7 struct test_item
8 {
9 const char *input, *field, *value;
10 };
11
12 static test_item testData[] = {
13 { "field=value", "field", "value"},
14 { "field =value", "field", "value"},
15 { "field = value", "field", "value"},
16 { " field = value", "field", "value"},
17 { " field = value", "field", "value"},
18 { " field =value", "field", "value"},
19 { " field =value ", "field", "value"},
20 { "\tfield =value ", "field", "value"},
21 { "\t field =value ", "field", "value"},
22 { "\t field = \t value\t\t ", "field", "value"},
23 { 0,0, 0 }
24 };
25
26 void testFieldParam::parser()
27 {
28 for(int i = 0; testData[i].input; ++i)
29 {
30 FieldParam p(testData[i].input);
31 TEST_ASSERT_EQUALS(p.name(), testData[i].field);
32 TEST_ASSERT_EQUALS(p.value(), testData[i].value);
33 }
34
35 }
36
37 }

  ViewVC Help
Powered by ViewVC 1.1.26