[gxml/gsoc2013] TextTest.vala: INDEX_SIZE exceptions no longer result in null returns



commit 8e2f0819ead34e9fa3304b56ac73fa4a8c4f1cf2
Author: Richard Schwarting <aquarichy gmail com>
Date:   Sun Jul 28 01:30:12 2013 -0400

    TextTest.vala: INDEX_SIZE exceptions no longer result in null returns

 test/TextTest.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/test/TextTest.vala b/test/TextTest.vala
index b24290c..bfd82dd 100644
--- a/test/TextTest.vala
+++ b/test/TextTest.vala
@@ -33,11 +33,13 @@ class TextTest : GXmlTest {
                                        assert (txt2.node_value == "Const");
 
                                        txt1 = txt2.split_text (-2);
-                                       assert (txt1 == null);
+                                       test_error (DomException.INDEX_SIZE);
+                                       assert (txt1.node_value == ""); // TODO: decide if we want to return 
null instead
                                        assert (txt2.node_value == "Const");
 
                                        txt1 = txt2.split_text (10);
-                                       assert (txt1 == null);
+                                       test_error (DomException.INDEX_SIZE);
+                                       assert (txt1.node_value == ""); // TODO: decide if we want to return 
null instead
                                        assert (txt2.node_value == "Const");
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]