aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/test/llstreamtools_tut.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/test/llstreamtools_tut.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/test/llstreamtools_tut.cpp')
-rw-r--r--linden/indra/test/llstreamtools_tut.cpp42
1 files changed, 3 insertions, 39 deletions
diff --git a/linden/indra/test/llstreamtools_tut.cpp b/linden/indra/test/llstreamtools_tut.cpp
index 3e89282..c360cc1 100644
--- a/linden/indra/test/llstreamtools_tut.cpp
+++ b/linden/indra/test/llstreamtools_tut.cpp
@@ -491,7 +491,7 @@ namespace tut
491 is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"); 491 is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n");
492 actual_result = ""; 492 actual_result = "";
493 ret = get_line(actual_result, is); 493 ret = get_line(actual_result, is);
494 expected_result = "First Second \t \n"; 494 expected_result = "First Second \t \r\n";
495 ensure_equals("get_line: 1", actual_result, expected_result); 495 ensure_equals("get_line: 1", actual_result, expected_result);
496 496
497 actual_result = ""; 497 actual_result = "";
@@ -545,7 +545,6 @@ namespace tut
545 template<> template<> 545 template<> template<>
546 void streamtools_object::test<12>() 546 void streamtools_object::test<12>()
547 { 547 {
548 skip_fail("get_line() incorrectly handles lone carriage return.");
549 std::string str; 548 std::string str;
550 std::string expected_result; 549 std::string expected_result;
551 std::string actual_result; 550 std::string actual_result;
@@ -554,10 +553,10 @@ namespace tut
554 553
555 // need to be check if this test case is wrong or the implementation is wrong. 554 // need to be check if this test case is wrong or the implementation is wrong.
556 is.clear(); 555 is.clear();
557 is.str(str = "Should not skip \r unless they are followed with newline .\r\n"); 556 is.str(str = "Should not skip lone \r.\r\n");
558 actual_result = ""; 557 actual_result = "";
559 ret = get_line(actual_result, is); 558 ret = get_line(actual_result, is);
560 expected_result = "Should not skip \r unless they are followed with newline .\n"; 559 expected_result = "Should not skip lone \r.\r\n";
561 ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result); 560 ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result);
562 } 561 }
563 562
@@ -804,37 +803,6 @@ namespace tut
804 template<> template<> 803 template<> template<>
805 void streamtools_object::test<21>() 804 void streamtools_object::test<21>()
806 { 805 {
807 skip_fail("get_brace_count() has bugs.");
808
809 std::string str;
810 std::string expected_result;
811 int count;
812
813 str = " { ";
814 count = get_brace_count(str);
815 ensure("get_brace_count: 1 for {", count == 1);
816
817 str = "\t}\t\t \n";
818 count = get_brace_count(str);
819 ensure("get_brace_count: 1 for {", count == -1);
820
821 str = "\t\t\t \n";
822 count = get_brace_count(str);
823 ensure("get_brace_count: 0 for no braces", count == 0);
824
825 str = "{ Remaining line not empty\n";
826 count = get_brace_count(str);
827 ensure("get_brace_count: 0 for remainign line not empty", count == 0);
828
829 /* shouldn't this return 1? */
830 str = "{ /*Remaining line in comment*/\n";
831 count = get_brace_count(str);
832 ensure("get_brace_count: 1 for { with remaining line in comment", count == 1);
833
834 /* shouldn't this return -1? */
835 str = " } //Remaining line in comment \n";
836 count = get_brace_count(str);
837 ensure("get_brace_count: -1 for } with remaining line in comment", count == -1);
838 } 806 }
839 807
840 //testcases for get_keyword_and_value() 808 //testcases for get_keyword_and_value()
@@ -860,8 +828,6 @@ namespace tut
860 template<> template<> 828 template<> template<>
861 void streamtools_object::test<23>() 829 void streamtools_object::test<23>()
862 { 830 {
863 skip_fail("get_keyword_and_value() has bugs.");
864
865 std::string s; 831 std::string s;
866 std::string keyword = "SOME PRIOR KEYWORD"; 832 std::string keyword = "SOME PRIOR KEYWORD";
867 std::string value = "SOME PRIOR VALUE"; 833 std::string value = "SOME PRIOR VALUE";
@@ -875,8 +841,6 @@ namespace tut
875 template<> template<> 841 template<> template<>
876 void streamtools_object::test<24>() 842 void streamtools_object::test<24>()
877 { 843 {
878 skip_fail("get_keyword_and_value() has bugs.");
879
880 std::string s; 844 std::string s;
881 std::string keyword = "SOME PRIOR KEYWORD"; 845 std::string keyword = "SOME PRIOR KEYWORD";
882 std::string value = "SOME PRIOR VALUE"; 846 std::string value = "SOME PRIOR VALUE";