2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file TestSuite05.cpp
20 * @brief Test cases for Attribute class.
29 #include <dpl/test/test_runner.h>
31 #include <ace/Attribute.h>
32 #include <ace-dao-ro/BaseAttribute.h>
34 #define TESTSUITE05(n) \
35 RUNNER_TEST(ts05_attr_tests_ ## n)
37 class AT : public Attribute {
43 static std::string* uriAuthorityStatic(const std::string *input) {
45 return at.uriAuthority(input);
48 static std::string* uriHostStatic(const std::string *input) {
50 return at.uriHost(input);
53 static std::string* uriSchemeStatic(const std::string *input) {
55 return at.uriScheme(input);
58 static std::string* uriSchemeAuthorityStatic(const std::string *input) {
59 AT at("Winnie the Pooh");
60 return at.uriSchemeAuthority(input);
63 static std::string* uriPathStatic(const std::string *input) {
65 return at.uriPath(input);
68 static bool markTest(){
70 for(int i =0; i<128; ++i){
71 if( i == '-' || i == '_' || i == '.'|| i == '!'|| i == '~' || i == '*' || i == '\'' || i == ')' || i == '(' ){
87 static bool digitTest(){
89 for(int i =0; i<128; ++i){
90 if( i > 47 && i < 58 ){
106 static bool alphaTest(){
108 for(int i =0; i<128; ++i){
109 if( ( i>64 && i<91 ) || ( i>96 && i<123 ) ) {
125 static bool isEscapedStatic(const char esc[3]) {
127 return at.isEscaped(esc);
131 bool assertEqual(const std::string * actual, const char * intended) {
132 if (actual == NULL || intended == NULL) {
133 if (intended == NULL && actual == NULL) {
141 std::string temp(intended);
143 if (temp == *actual) {
151 bool assertTrue(bool condition){
155 bool assertFalse(bool condition){
159 RUNNER_TEST_GROUP_INIT(ACE_TEST_SUITE_05)
164 * description: testing uriAuthority method of Attribute class on
165 * "http://www.wp.pl" argument
166 * expect: "www.wp.pl"
168 TESTSUITE05(01_uriAuthority){
169 std::unique_ptr<std::string> outcome;
170 std::string query("http://www.wp.pl");
171 outcome.reset(AT::uriAuthorityStatic(&query));
172 RUNNER_ASSERT(assertEqual(outcome.get(), "www.wp.pl"));
179 * description: testing uriAuthority method of Attribute class on
180 * "http://authority?path/asdf" argument
181 * expect: "authority"
183 TESTSUITE05(02_uriAuthority){
184 std::unique_ptr<std::string> outcome;
185 std::string query("http://authority?path/asdf");
186 outcome.reset(AT::uriAuthorityStatic(&query));
187 RUNNER_ASSERT(assertEqual(outcome.get(), "authority"));
194 * description: testing uriAuthority method of Attribute class on
198 TESTSUITE05(03_uriAuthority){
199 std::unique_ptr<std::string> outcome;
200 std::string query("abcd"); //This should be interpreted as schema
201 outcome.reset(AT::uriAuthorityStatic(&query));
202 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
209 * description: testing uriAuthority method of Attribute class on
210 * "http://authority/asdf" argument
211 * expect: "authority"
213 TESTSUITE05(04_uriAuthority){
214 std::unique_ptr<std::string> outcome;
215 std::string query("http://authority/asdf");
216 outcome.reset(AT::uriAuthorityStatic(&query));
217 RUNNER_ASSERT(assertEqual(outcome.get(), "authority"));
224 * description: testing uriAuthority method of Attribute class on
225 * "http://user@host:20?ds" argument
226 * expect: "user@host:20"
228 TESTSUITE05(05_uriAuthority){
229 std::unique_ptr<std::string> outcome;
230 std::string query("http://user@host:20?ds");
231 outcome.reset(AT::uriAuthorityStatic(&query));
232 RUNNER_ASSERT(assertEqual(outcome.get(), "user@host:20"));
239 * description: testing uriAuthority method of Attribute class on
240 * "http://hostname:23" argument
241 * expect: "hostname:23"
243 TESTSUITE05(06_uriAuthority){
244 std::unique_ptr<std::string> outcome;
245 std::string query("http://hostname:23");
246 outcome.reset(AT::uriAuthorityStatic(&query));
247 RUNNER_ASSERT(assertEqual(outcome.get(), "hostname:23"));
254 * description: testing uriAuthority method of Attribute class on
255 * "http://hostname:23" argument
256 * expect: "hostname:23"
258 TESTSUITE05(07_uriAuthority){
259 std::unique_ptr<std::string> outcome;
260 std::string query("http://user@host:port");
261 outcome.reset(AT::uriAuthorityStatic(&query));
262 RUNNER_ASSERT(assertEqual(outcome.get(), "user@host:port"));
269 * description: testing uriAuthority method of Attribute class on
270 * "http://1user@host:port" argument
271 * expect: "1user@host:port"
273 TESTSUITE05(08_uriAuthority){
274 std::unique_ptr<std::string> outcome;
275 std::string query("http://1user@host:port"); //This is a VALID URI
276 outcome.reset(AT::uriAuthorityStatic(&query));
277 RUNNER_ASSERT(assertEqual(outcome.get(), "1user@host:port"));
284 * description: testing uriAuthority method of Attribute class on
285 * "http://abc%30" argument
288 TESTSUITE05(09_uriAuthority){
289 std::unique_ptr<std::string> outcome;
290 std::string query("http://abc%30"); //This is not a valid uri
291 outcome.reset(AT::uriAuthorityStatic(&query));
292 RUNNER_ASSERT(assertEqual(outcome.get(), "abc%30"));
299 * description: testing uriAuthority method of Attribute class on
300 * "http:///asd" argument (not a valid URI)
303 TESTSUITE05(10_uriAuthority){
304 std::unique_ptr<std::string> outcome;
305 std::string query("http:///asd"); //This is not a valid uri
306 outcome.reset(AT::uriAuthorityStatic(&query));
307 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
314 * description: testing uriAuthority method of Attribute class on
315 * "http://?asd" argument (not a valid URI)
318 TESTSUITE05(11_uriAuthority){
319 std::unique_ptr<std::string> outcome;
320 std::string query("http://?asd"); //This is not a valid uri
321 outcome.reset(AT::uriAuthorityStatic(&query));
322 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
329 * description: testing uriAuthority method of Attribute class on
330 * "http://%34%56%67%ab" argument
331 * expect: "%34%56%67%ab"
333 TESTSUITE05(12_uriAuthority){
334 std::unique_ptr<std::string> outcome;
335 std::string query("http://%34%56%67%ab");
336 outcome.reset(AT::uriAuthorityStatic(&query));
337 RUNNER_ASSERT(assertEqual(outcome.get(), "%34%56%67%ab"));
344 * description: testing uriAuthority method of Attribute class on
345 * "http://<>" argument (not a valid URI)
348 TESTSUITE05(13_uriAuthority){
349 std::unique_ptr<std::string> outcome;
350 std::string query("http://<>"); //This is not a valid uri
351 outcome.reset(AT::uriAuthorityStatic(&query));
352 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
359 * description: testing uriAuthority method of Attribute class on
360 * "http://\\/" argument (not a valid URI)
363 TESTSUITE05(14_uriAuthority){
364 std::unique_ptr<std::string> outcome;
365 std::string query("http://\\/"); //This is not a valid uri
366 outcome.reset(AT::uriAuthorityStatic(&query));
367 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
374 * description: testing uriHost method of Attribute class on
375 * "http://user@host:23" argument
378 TESTSUITE05(15_uriHost){
379 std::unique_ptr<std::string> outcome;
380 std::string query("http://user@host:23");
381 outcome.reset(AT::uriHostStatic(&query));
382 RUNNER_ASSERT(assertEqual(outcome.get(), "host"));
389 * description: testing uriHost method of Attribute class on
390 * "http://user@host:name" argument (not a valid URI)
393 TESTSUITE05(16_uriHost){
394 std::unique_ptr<std::string> outcome;
395 std::string query("http://user@host:name"); //This is not a valid uri
396 outcome.reset(AT::uriHostStatic(&query));
397 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
404 * description: testing uriHost method of Attribute class on
405 * "http::::" argument (not a valid URI)
408 TESTSUITE05(17_uriHost){
409 std::unique_ptr<std::string> outcome;
410 std::string query("http::::"); //This is a valid uri
411 outcome.reset(AT::uriHostStatic(&query));
412 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
419 * description: testing uriHost method of Attribute class on
420 * "..%%%." argument (not a valid URI)
423 TESTSUITE05(18_uriHost){
424 std::unique_ptr<std::string> outcome;
425 std::string query("..%%%."); //This is not a valid uri
426 outcome.reset(AT::uriHostStatic(&query));
427 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
434 * description: testing uriHost method of Attribute class on
435 * "ftp://abds.eu/fda" argument
438 TESTSUITE05(19_uriHost){
439 std::unique_ptr<std::string> outcome;
440 std::string query("ftp://abds.eu/fda");
441 outcome.reset(AT::uriHostStatic(&query));
442 RUNNER_ASSERT(assertEqual(outcome.get(), "abds.eu"));
449 * description: testing uriHost method of Attribute class on
450 * "abs%14ccc" argument
453 TESTSUITE05(20_uriHost){
454 std::unique_ptr<std::string> outcome;
455 std::string query("abs%14ccc");
456 //This is a valid uri because it's interpreted as a path not a host
457 outcome.reset(AT::uriHostStatic(&query));
458 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
465 * description: testing uriHost method of Attribute class on
466 * "http://abc@123.2.23.213:982" argument
467 * expect: "123.2.23.213"
469 TESTSUITE05(21_uriHost){
470 std::unique_ptr<std::string> outcome;
471 std::string query("http://abc@123.2.23.213:982");
472 outcome.reset(AT::uriHostStatic(&query));
473 RUNNER_ASSERT(assertEqual(outcome.get(), "123.2.23.213"));
480 * description: testing uriHost method of Attribute class on
481 * "http://abc@1233.2.23.213:982" argument
484 TESTSUITE05(22_uriHost){
485 std::unique_ptr<std::string> outcome;
486 std::string query("http://abc@1233.2.23.213:982");
487 //Hostname is invalid, but uri is valid
488 outcome.reset(AT::uriHostStatic(&query));
489 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
496 * description: testing uriHost method of Attribute class on
497 * "http://ab%23c@host" argument
500 TESTSUITE05(23_uriHost){
501 std::unique_ptr<std::string> outcome;
502 std::string query("http://ab%23c@host"); //Valid escaped characters
503 outcome.reset(AT::uriHostStatic(&query));
504 RUNNER_ASSERT(assertEqual(outcome.get(), "host"));
511 * description: testing uriHost method of Attribute class on
512 * "http://ab%23c@host%34" argument
515 TESTSUITE05(24_uriHost){
516 std::unique_ptr<std::string> outcome;
517 std::string query("http://ab%23c@host%34"); //Invalid escaped characters in hostname
518 outcome.reset(AT::uriHostStatic(&query));
519 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
526 * description: testing uriHost method of Attribute class on
527 * "http://ab%GGc@host" argument
530 TESTSUITE05(25_uriHost){
531 std::unique_ptr<std::string> outcome;
532 std::string query("http://ab%GGc@host"); //Wrong character %
533 outcome.reset(AT::uriHostStatic(&query));
534 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
541 * description: testing uriHost method of Attribute class on
542 * "http://www.example.pl" argument
543 * expect: "www.example.pl"
545 TESTSUITE05(26_uriHost){
546 std::unique_ptr<std::string> outcome;
547 std::string query("http://www.example.pl");
548 outcome.reset(AT::uriHostStatic(&query));
549 RUNNER_ASSERT(assertEqual(outcome.get(), "www.example.pl"));
556 * description: testing uriScheme method of Attribute class on
557 * "http://host" argument
560 TESTSUITE05(27_uriScheme){
561 std::unique_ptr<std::string> outcome;
562 std::string query("http://host");
563 outcome.reset(AT::uriSchemeStatic(&query));
564 RUNNER_ASSERT(assertEqual(outcome.get(), "http"));
571 * description: testing uriScheme method of Attribute class on
572 * "1http://host" argument
575 TESTSUITE05(28_uriScheme){
576 std::unique_ptr<std::string> outcome;
577 //Wrong character '1' in scheme , it's not an URI because two slashes are not acceptable
578 //in any other place than in separation between scheme and pat
579 std::string query("1http://host");
580 outcome.reset(AT::uriSchemeStatic(&query));
581 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
588 * description: testing uriScheme method of Attribute class on
589 * "ftp+a-fdf.ads://host" argument
590 * expect: "ftp+a-fdf.ads"
592 TESTSUITE05(29_uriScheme){
593 std::unique_ptr<std::string> outcome;
594 std::string query("ftp+a-fdf.ads://host");
595 outcome.reset(AT::uriSchemeStatic(&query));
596 RUNNER_ASSERT(assertEqual(outcome.get(), "ftp+a-fdf.ads"));
603 * description: testing uriScheme method of Attribute class on
604 * "+++://host" argument
607 TESTSUITE05(30_uriScheme){
608 std::unique_ptr<std::string> outcome;
609 //Scheme cannot start with plus, it's not an URI because two slashes are not acceptable
610 //in any other place than in separation between scheme and path
611 std::string query("+++://host");
612 outcome.reset(AT::uriSchemeStatic(&query));
613 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
620 * description: testing uriScheme method of Attribute class on
624 TESTSUITE05(31_uriScheme){
625 std::unique_ptr<std::string> outcome;
626 std::string query("aaaac"); //It's a path not a scheme'a
627 outcome.reset(AT::uriSchemeStatic(&query));
628 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
635 * description: testing uriScheme method of Attribute class on
636 * "ftpa%34fdfads://host" argument
639 TESTSUITE05(32_uriScheme){
640 std::unique_ptr<std::string> outcome;
641 //no escaped characters in schema, it's not an URI because two slashes are not acceptable
642 //in any other place than in separation between scheme and path
643 std::string query("ftpa%34fdfads://host");
644 outcome.reset(AT::uriSchemeStatic(&query));
645 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
652 * description: testing uriScheme method of Attribute class on
653 * "meaninglessstring://host%34" argument
654 * expect: "meaninglessstring"
656 TESTSUITE05(33_uriScheme){
657 std::unique_ptr<std::string> outcome;
658 //no escaped characters in schema, it's not an URI because two slashes are not acceptable
659 //in any other place than in separation between scheme and path
660 std::string query("meaninglessstring://host%34");
661 outcome.reset(AT::uriSchemeStatic(&query));
662 RUNNER_ASSERT(assertEqual(outcome.get(), "meaninglessstring"));
669 * description: testing uriScheme method of Attribute class on
670 * "meaninglessstring2://" argument
671 * expect: "meaninglessstring2"
673 TESTSUITE05(34_uriScheme){
674 std::unique_ptr<std::string> outcome;
675 std::string query("meaninglessstring2://");
676 outcome.reset(AT::uriSchemeStatic(&query));
677 RUNNER_ASSERT(assertEqual(outcome.get(), "meaninglessstring2"));
684 * description: testing uriScheme method of Attribute class on
685 * "http://www.samsung.com/ace/bondi#5" argument
688 TESTSUITE05(35_uriScheme){
689 std::unique_ptr<std::string> outcome;
690 std::string query("http://www.samsung.com/ace/bondi#5");
691 outcome.reset(AT::uriSchemeStatic(&query));
692 RUNNER_ASSERT(assertEqual(outcome.get(), "http"));
699 * description: testing uriScheme method of Attribute class on
700 * "www.samsung.com" argument
703 TESTSUITE05(36_uriScheme){
704 std::unique_ptr<std::string> outcome;
705 std::string query("www.samsung.com");
706 outcome.reset(AT::uriSchemeStatic(&query));
707 RUNNER_ASSERT(assertEqual(outcome.get(), ""));
714 * description: testing uriSchemeAuthority method of Attribute class on
715 * "http://www.samsung.com" argument
716 * expect: "http://www.samsung.com"
718 TESTSUITE05(37_uriSchemeAuthority){
719 std::unique_ptr<std::string> outcome;
720 std::string query("http://www.samsung.com");
721 outcome.reset(AT::uriSchemeAuthorityStatic(&query));
722 RUNNER_ASSERT(assertEqual(outcome.get(), "http://www.samsung.com"));
729 * description: testing uriSchemeAuthority method of Attribute class on
730 * "ftp23://www.samsung.com/avc%23" argument
731 * expect: "ftp23://www.samsung.com"
733 TESTSUITE05(38_uriSchemeAuthority){
734 std::unique_ptr<std::string> outcome;
735 std::string query("ftp23://www.samsung.com/avc%23");
736 outcome.reset(AT::uriSchemeAuthorityStatic(&query));
737 RUNNER_ASSERT(assertEqual(outcome.get(), "ftp23://www.samsung.com"));
744 * description: testing uriSchemeAuthority method of Attribute class on
745 * "ftp++://anonymous@hostname:12/avc%23" argument
746 * expect: "ftp++://anonymous@hostname:12"
748 TESTSUITE05(39_uriSchemeAuthority){
749 std::unique_ptr<std::string> outcome;
750 std::string query("ftp++://anonymous@hostname:12/avc%23");
751 outcome.reset(AT::uriSchemeAuthorityStatic(&query));
752 RUNNER_ASSERT(assertEqual(outcome.get(), "ftp++://anonymous@hostname:12"));
759 * description: testing uriSchemeAuthority method of Attribute class on
760 * "32ftp://anonymous@hostname:12/avc%23" argument
763 TESTSUITE05(40_uriSchemeAuthority){
764 std::unique_ptr<std::string> outcome;
765 std::string query("32ftp://anonymous@hostname:12/avc%23");
766 outcome.reset(AT::uriSchemeAuthorityStatic(&query));
767 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
774 * description: testing uriSchemeAuthority method of Attribute class on
775 * "http://aaabbb?acd" argument
776 * expect: "http://aaabbb"
778 TESTSUITE05(41_uriSchemeAuthority){
779 std::unique_ptr<std::string> outcome;
780 std::string query("http://aaabbb?acd");
781 outcome.reset(AT::uriSchemeAuthorityStatic(&query));
782 RUNNER_ASSERT(assertEqual(outcome.get(), "http://aaabbb"));
789 * description: testing uriSchemeAuthority method of Attribute class on
790 * "http://aaabbb/acd;sdf;sdf" argument
791 * expect: "http://aaabbb"
793 TESTSUITE05(42_uriSchemeAuthority){
794 std::unique_ptr<std::string> outcome;
795 std::string query("http://aaabbb/acd;sdf;sdf");
796 outcome.reset(AT::uriSchemeAuthorityStatic(&query));
797 RUNNER_ASSERT(assertEqual(outcome.get(), "http://aaabbb"));
804 * description: testing uriPath method of Attribute class on
805 * "ftp://authority//invalidpath" argument
808 TESTSUITE05(43_uriPath){
809 std::unique_ptr<std::string> outcome;
810 std::string query("ftp://authority//invalidpath");
811 outcome.reset(AT::uriPathStatic(&query));
812 RUNNER_ASSERT(assertEqual(outcome.get(), NULL));
819 * description: testing uriPath method of Attribute class on
820 * "ftp://authority/validpath" argument
821 * expect: "validpath"
823 TESTSUITE05(44_uriPath){
824 std::unique_ptr<std::string> outcome;
825 std::string query("ftp://authority/validpath");
826 outcome.reset(AT::uriPathStatic(&query));
827 RUNNER_ASSERT(assertEqual(outcome.get(), "validpath"));
834 * description: testing uriPath method of Attribute class on
835 * "ftp://authority/validpath;param;param" argument
836 * expect: "validpath;param;param"
838 TESTSUITE05(45_uriPath){
839 std::unique_ptr<std::string> outcome;
840 std::string query("ftp://authority/validpath;param;param");
841 outcome.reset(AT::uriPathStatic(&query));
842 RUNNER_ASSERT(assertEqual(outcome.get(), "validpath;param;param"));
849 * description: testing uriPath method of Attribute class on
850 * "ftp://authority/validpath;param;param?query" argument
851 * expect: "validpath;param;param"
853 TESTSUITE05(46_uriPath){
854 std::unique_ptr<std::string> outcome;
855 std::string query("ftp://authority/validpath;param;param?query");
856 outcome.reset(AT::uriPathStatic(&query));
857 RUNNER_ASSERT(assertEqual(outcome.get(), "validpath;param;param"));
864 * description: testing uriPath method of Attribute class on
865 * "ftp://authority/validpath;?param;param?query" argument
866 * expect: "validpath;"
868 TESTSUITE05(47_uriPath){
869 std::unique_ptr<std::string> outcome;
870 std::string query("ftp://authority/validpath;?param;param?query");
871 outcome.reset(AT::uriPathStatic(&query));
872 RUNNER_ASSERT(assertEqual(outcome.get(), "validpath;"));
879 * description: testing uriPath method of Attribute class on
880 * "ftp://authority/validpath;param?;param?query" argument
881 * expect: "validpath;param"
883 TESTSUITE05(48_uriPath){
884 std::unique_ptr<std::string> outcome;
885 std::string query("ftp://authority/validpath;param?;param?query");
886 outcome.reset(AT::uriPathStatic(&query));
887 RUNNER_ASSERT(assertEqual(outcome.get(), "validpath;param"));
894 * description: testing uriPath method of Attribute class on
895 * "ftp://authority/valid:path?query" argument
896 * expect: "valid:path"
898 TESTSUITE05(49_uriPath){
899 std::unique_ptr<std::string> outcome;
900 std::string query("ftp://authority/valid:path?query");
901 outcome.reset(AT::uriPathStatic(&query));
902 RUNNER_ASSERT(assertEqual(outcome.get(), "valid:path"));
909 * description: testing uriPath method of Attribute class on
910 * "ftp://authority/:::" argument
913 TESTSUITE05(50_uriPath){
914 std::unique_ptr<std::string> outcome;
915 std::string query("ftp://authority/:::");
916 outcome.reset(AT::uriPathStatic(&query));
917 RUNNER_ASSERT(assertEqual(outcome.get(), ":::"));
924 * description: testing uriPath method of Attribute class on
925 * "/path1/path2?abc#fragment" argument
926 * expect: "path1/path2"
928 TESTSUITE05(51_uriPath){
929 std::unique_ptr<std::string> outcome;
930 std::string query("/path1/path2?abc#fragment");
931 outcome.reset(AT::uriPathStatic(&query));
932 RUNNER_ASSERT(assertEqual(outcome.get(), "path1/path2"));
939 * description: testing uriPath method of Attribute class on
940 * "http://www.samsung.com/normalpath/path2?query" argument
941 * expect: "normalpath/path2"
943 TESTSUITE05(52_uriPath){
944 std::unique_ptr<std::string> outcome;
945 std::string query("http://www.samsung.com/normalpath/path2?query");
946 outcome.reset(AT::uriPathStatic(&query));
947 RUNNER_ASSERT(assertEqual(outcome.get(), "normalpath/path2"));
954 * description: testing if "mark" static table in Attribute class contains
955 * "true" on indices for characters -_.!~*')(
958 TESTSUITE05(53_markTest){
959 RUNNER_ASSERT(AT::markTest());
965 * description: testing if "digit" static table in Attribute class contains
966 * "true" on indices for characters that are digits
969 TESTSUITE05(54_digitTest){
970 RUNNER_ASSERT(AT::digitTest());
976 * description: testing if "digit" static table in Attribute class contains
977 * "true" on indices for characters that are real characters (letters)
980 TESTSUITE05(55_alphaTest){
981 RUNNER_ASSERT(AT::alphaTest());
987 * description: checking Attribute isEscapedStatic method of Attribute class
988 * expect: true, true, false, false, false, false, true, true
990 TESTSUITE05(56_escapedTest){
991 const char * query = "%23";
992 RUNNER_ASSERT(assertTrue(AT::isEscapedStatic(query)));
994 RUNNER_ASSERT(assertTrue(AT::isEscapedStatic(query)));
997 RUNNER_ASSERT(assertFalse(AT::isEscapedStatic(query)));
1000 RUNNER_ASSERT(assertFalse(AT::isEscapedStatic(query)));
1003 RUNNER_ASSERT(assertFalse(AT::isEscapedStatic(query)));
1006 RUNNER_ASSERT(assertFalse(AT::isEscapedStatic(query)));
1009 RUNNER_ASSERT(assertTrue(AT::isEscapedStatic(query)));
1012 RUNNER_ASSERT(assertTrue(AT::isEscapedStatic(query)));