public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mario Torre <neugens@limasoftware.net>
To: mauve-patches@sourceware.org
Subject: FYI: GConf Preference test small update
Date: Wed, 21 Jun 2006 19:23:00 -0000	[thread overview]
Message-ID: <1150917890.2656.5.camel@nirvana.limasoftware.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 434 bytes --]

Hi have added a simple test:

2006-06-21  neugens  <neugens@limasoftware.net>

	* gnu/testlet/java/util/prefs/PreferenceTest.java (testBoolean): new
test
	method.
	(test): call to enable new test.

Mario

-- 
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/

[-- Attachment #1.2: mauve_preference_test.patch --]
[-- Type: text/x-patch, Size: 2081 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1715
diff -u -r1.1715 ChangeLog
--- ChangeLog	21 Jun 2006 10:02:08 -0000	1.1715
+++ ChangeLog	21 Jun 2006 19:20:44 -0000
@@ -1,3 +1,9 @@
+2006-06-21  neugens  <neugens@limasoftware.net>
+
+	* gnu/testlet/java/util/prefs/PreferenceTest.java (testBoolean): new test
+	method.
+	(test): call to enable new test.
+
 2006-06-21  Gary Benson  <gbenson@redhat.com>
 
 	* gnu/testlet/java/lang/reflect/AccessibleObject/security.java: New test.
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:20:49 -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()");

[-- Attachment #2: Questa è una parte del messaggio firmata digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2006-06-21 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21 19:23 Mario Torre [this message]
2006-06-21 20:09 ` Mario Torre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1150917890.2656.5.camel@nirvana.limasoftware.net \
    --to=neugens@limasoftware.net \
    --cc=mauve-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).