This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
Re: FYI: GConf Preference test small update
- From: Mario Torre <neugens at limasoftware dot net>
- To: mauve-patches at sourceware dot org
- Date: Wed, 21 Jun 2006 22:10:20 +0200
- Subject: Re: FYI: GConf Preference test small update
- References: <1150917890.2656.5.camel@nirvana.limasoftware.net>
Attached the right patch without the ChangeLog in it...
Sorry for the confusion, I feel a newbie...
Mario
2006-06-21 neugens <neugens@limasoftware.net>
* gnu/testlet/java/util/prefs/PreferenceTest.java (testBoolean): new
test
method.
(test): call to enable new test.
--
Lima Software, SO.PR.IND. s.r.l.
http://www.limasoftware.net/
pgp key: http://subkeys.pgp.net/
Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
Index: gnu/testlet/java/util/prefs/PreferenceTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/prefs/PreferenceTest.java,v
retrieving revision 1.1
diff -u -r1.1 PreferenceTest.java
--- gnu/testlet/java/util/prefs/PreferenceTest.java 19 Jun 2006 09:57:34 -0000 1.1
+++ gnu/testlet/java/util/prefs/PreferenceTest.java 21 Jun 2006 19:53:02 -0000
@@ -93,6 +93,7 @@
testPut();
testByte();
+ testBoolean();
testListener();
testChildren();
@@ -319,6 +320,35 @@
}
}
+ private void testBoolean()
+ {
+ this.harness.checkPoint("testBoolean()");
+
+ String key = "boolean_key";
+ String _true = "TrUe";
+
+ // test "normal" booleans
+ this.prefs.putBoolean(key, true);
+ boolean result = this.prefs.getBoolean(key, false);
+
+ this.harness.check(result, true);
+
+ // test String as boolean
+ this.prefs.remove(key);
+ try {
+ this.prefs.flush();
+
+ } catch (BackingStoreException e) {
+ print(e.getLocalizedMessage());
+ this.harness.fail("call to testBoolean() - fail to flush");
+ }
+
+ this.prefs.put(key, _true);
+ result = this.prefs.getBoolean(key, false);
+
+ this.harness.check(result, true);
+ }
+
private void testListener()
{
this.harness.checkPoint("testListener()");