[Jifty-commit] r5456 - Method-Inline/t

Jifty commits jifty-commit at lists.jifty.org
Sat May 10 16:22:08 EDT 2008


Author: clkao
Date: Sat May 10 16:22:08 2008
New Revision: 5456

Modified:
   Method-Inline/t/simple.t

Log:
update test.

Modified: Method-Inline/t/simple.t
==============================================================================
--- Method-Inline/t/simple.t	(original)
+++ Method-Inline/t/simple.t	Sat May 10 16:22:08 2008
@@ -1,4 +1,4 @@
-use Test::More tests => 2;
+use Test::More tests => 10;
 use ok 'Class::Accessor::Inline';
 
 package Foo;
@@ -7,17 +7,38 @@
 
 package main;
 
-
 my $foo = Foo->new( { foo => 'orz' });
 
 sub hate {
     $foo->foo;;
 }
 
+sub update {
+    $foo->foo(['wtf', 'hate']);
+
+}
 
+sub update1 {
+    $foo->foo('wtf');
 
-warn hate();
-$foo->foo('newval');
+}
+sub doublehate {
+    my $x = $foo->foo;
+    return $x;
+}
 
-warn hate();
-warn hate();
+is(hate(), 'orz');
+is(hate(), 'orz');
+update1();
+is(hate(), 'wtf');
+is(doublehate(), 'wtf');
+is(doublehate(), 'wtf');
+update();
+is_deeply(doublehate(), ['wtf', 'hate']);
+
+update1();
+is(doublehate(), 'wtf');
+
+update();
+is_deeply(doublehate(), ['wtf', 'hate']);
+is_deeply(hate(), ['wtf', 'hate']);


More information about the Jifty-commit mailing list