[seed] Change seed_value_to_string to use %lg, and update all the tests



commit b4ff50beb374ed4403b5cc8973580a34a8f416fd
Author: Robert Carr <racarr svn gnome org>
Date:   Wed Apr 29 23:45:24 2009 -0400

    Change seed_value_to_string to use %lg, and update all the tests
---
 libseed/seed-types.c                         |    2 +-
 tests/javascript/builtin-argument-length.js  |    2 +-
 tests/javascript/compare.js                  |    2 +-
 tests/javascript/enum.js                     |    2 +-
 tests/javascript/everything.js               |    3 +--
 tests/javascript/gdk-event.js                |    2 +-
 tests/javascript/gtype-property-construct.js |    2 +-
 tests/javascript/gtype-property.js           |    2 +-
 tests/javascript/readline-bind.js            |    2 +-
 tests/javascript/readline.js                 |    2 +-
 tests/javascript/signal-connect.js           |    2 +-
 tests/javascript/struct-constructor.js       |    2 +-
 tests/javascript/struct-nested-set.js        |    2 +-
 tests/javascript/struct-offsets.js           |    2 +-
 tests/javascript/struct-set-member.js        |    2 +-
 15 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index dafa482..6696d64 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -1773,7 +1773,7 @@ seed_value_to_string (JSContextRef ctx,
     }
   else if (JSValueIsBoolean (ctx, val) || JSValueIsNumber (ctx, val))
     {
-      buf = g_strdup_printf ("%lf", JSValueToNumber (ctx, val, NULL));
+      buf = g_strdup_printf ("%lg", JSValueToNumber (ctx, val, NULL));
     }
   else
     {
diff --git a/tests/javascript/builtin-argument-length.js b/tests/javascript/builtin-argument-length.js
index 3d9cd72..ddbaca9 100755
--- a/tests/javascript/builtin-argument-length.js
+++ b/tests/javascript/builtin-argument-length.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:Seed\.spawn expected 1 argument\nFailed to execute child process "asihfieuhgieuhgw" \(No such file or directory\)\nSeed\.include expected 1 argument, got 0\nFile not found: 1\.000000\nFile not found: \nSeed\.include expected 1 argument, got 2\nSeed\.include expected 1 argument, got 2\nSeed\.print expected 1 argument, got 0\nSeed\.print expected 1 argument, got 2\nSeed\.print expected 1 argument, got 2\nSeed\.print expected 1 argument, got 3\nSeed\.introspect expected 1 argument, got 0\nSeed\.introspect expected 1 argument, got 2\nSeed\.check_syntax expected 1 argument, got 0\nSeed\.check_syntax expected 1 argument, got 2
+// STDOUT:Seed\.spawn expected 1 argument\nFailed to execute child process "asihfieuhgieuhgw" \(No such file or directory\)\nSeed\.include expected 1 argument, got 0\nFile not found: 1\nFile not found: \nSeed\.include expected 1 argument, got 2\nSeed\.include expected 1 argument, got 2\nSeed\.print expected 1 argument, got 0\nSeed\.print expected 1 argument, got 2\nSeed\.print expected 1 argument, got 2\nSeed\.print expected 1 argument, got 3\nSeed\.introspect expected 1 argument, got 0\nSeed\.introspect expected 1 argument, got 2\nSeed\.check_syntax expected 1 argument, got 0\nSeed\.check_syntax expected 1 argument, got 2
 // STDERR:
 
 try{
diff --git a/tests/javascript/compare.js b/tests/javascript/compare.js
index 68d2d41..f980560 100755
--- a/tests/javascript/compare.js
+++ b/tests/javascript/compare.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:0.000000\n1.000000
+// STDOUT:0\n1
 // STDERR:
 
 Gtk = imports.gi.Gtk;
diff --git a/tests/javascript/enum.js b/tests/javascript/enum.js
index e74ce3c..d6ed65c 100755
--- a/tests/javascript/enum.js
+++ b/tests/javascript/enum.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:2.000000
+// STDOUT:2
 // STDERR:
  
 Gtk = imports.gi.Gtk;
diff --git a/tests/javascript/everything.js b/tests/javascript/everything.js
index b24ce37..5024cfa 100755
--- a/tests/javascript/everything.js
+++ b/tests/javascript/everything.js
@@ -1,9 +1,8 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:1\.000000\n-124\.000000\n129\.000000\n-1235\.000000\n1387\.000000\n-123435\.000000\n133487\.000000\n-16323375\.000000\n13873737\.000000\n-16325\.000000\n33737\.000000\n-16325\.000000\n33737\.000000\n12\.000000\n143\.000000\n-1853\.123291\n-134543853\.123340\n8\.000000\n\["åäö","\/etc\/fstab"\]\n\["1","2","3"\]\n\["1","2","3"\]\n\["1","2","3"\]\n\["1","2","3"\]\n1,2,3\n5\.000000\n0\.000000\n123\.000000\n0\.000000\n1\.000000\n42\.000000\n1\.000000\n4\.000000\n15\.000000\n120\.000000\n120\.235700\n42\.000000\n19\.000000
+// STDOUT:1\n-124\n129\n-1235\n1387\n-123435\n133487\n-1\.63234e\+07\n1\.38737e\+07\n-16325\n33737\n-16325\n33737\n12\n143\n-1853\.12\n-1\.34544e\+08\n8\n\["åäö","\/etc\/fstab"\]\n\["1","2","3"\]\n\["1","2","3"\]\n\["1","2","3"\]\n\["1","2","3"\]\n1,2,3\n5\n0\n123\n0\n1\n42\n1\n4\n15\n120\n120\.236\n42\n19
 // STDERR:
-
 Everything = imports.gi.Everything;
 GObject = imports.gi.GObject;
 
diff --git a/tests/javascript/gdk-event.js b/tests/javascript/gdk-event.js
index 16339c4..414d39f 100755
--- a/tests/javascript/gdk-event.js
+++ b/tests/javascript/gdk-event.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:\[object GdkWindow\]\n\[object GdkWindow\]\n1\.000000\n200\.000000
+// STDOUT:\[object GdkWindow\]\n\[object GdkWindow\]\n1\n200
 // STDERR:
 
 Gtk = imports.gi.Gtk;
diff --git a/tests/javascript/gtype-property-construct.js b/tests/javascript/gtype-property-construct.js
index f5fb895..2c58cb1 100755
--- a/tests/javascript/gtype-property-construct.js
+++ b/tests/javascript/gtype-property-construct.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:1\.000000
+// STDOUT:1
 // STDERR:
 
 Gtk = imports.gi.Gtk;
diff --git a/tests/javascript/gtype-property.js b/tests/javascript/gtype-property.js
index 3a1b2d6..a9532bf 100755
--- a/tests/javascript/gtype-property.js
+++ b/tests/javascript/gtype-property.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:1\.000000\n0\.000000
+// STDOUT:1\n0
 // STDERR:
 
 Gtk = imports.gi.Gtk;
diff --git a/tests/javascript/readline-bind.js b/tests/javascript/readline-bind.js
index 8b47b5d..151c7b1 100755
--- a/tests/javascript/readline-bind.js
+++ b/tests/javascript/readline-bind.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:a 2+2
-// STDOUT:Got here!\n4.000000
+// STDOUT:Got here!\n4
 // STDERR:
 
 readline = imports.readline;
diff --git a/tests/javascript/readline.js b/tests/javascript/readline.js
index b2bcdc1..4f66048 100755
--- a/tests/javascript/readline.js
+++ b/tests/javascript/readline.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:2+2
-// STDOUT:4.000000
+// STDOUT:4
 // STDERR:
 
 readline = imports.readline;
diff --git a/tests/javascript/signal-connect.js b/tests/javascript/signal-connect.js
index d13992c..9dbaabc 100755
--- a/tests/javascript/signal-connect.js
+++ b/tests/javascript/signal-connect.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:\[object GtkButton\]\n1\.000000\n0\.500000
+// STDOUT:\[object GtkButton\]\n1\n0\.5
 // STDERR:
 
 Gtk = imports.gi.Gtk;
diff --git a/tests/javascript/struct-constructor.js b/tests/javascript/struct-constructor.js
index 435db96..72e9eee 100755
--- a/tests/javascript/struct-constructor.js
+++ b/tests/javascript/struct-constructor.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:100\.000000\n90\.000000\n80\.000000
+// STDOUT:100\n90\n80
 // STDERR:
 
 Gdk = imports.gi.Gdk;
diff --git a/tests/javascript/struct-nested-set.js b/tests/javascript/struct-nested-set.js
index a7d4d85..93dfbe4 100755
--- a/tests/javascript/struct-nested-set.js
+++ b/tests/javascript/struct-nested-set.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:\[object seed_union\]\n2\.000000\n300\.000000
+// STDOUT:\[object seed_union\]\n2\n300
 // STDERR:
 
 Gdk = imports.gi.Gdk;
diff --git a/tests/javascript/struct-offsets.js b/tests/javascript/struct-offsets.js
index 53b4d14..24ef50e 100755
--- a/tests/javascript/struct-offsets.js
+++ b/tests/javascript/struct-offsets.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:17\.000000\n0\.000000
+// STDOUT:17\n0
 // STDERR:
 
 Pango = imports.gi.Pango;
diff --git a/tests/javascript/struct-set-member.js b/tests/javascript/struct-set-member.js
index 6b9eb3c..28d5f61 100755
--- a/tests/javascript/struct-set-member.js
+++ b/tests/javascript/struct-set-member.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env seed
 // Returns: 0
 // STDIN:
-// STDOUT:0\.000000\n200\.000000
+// STDOUT:0\n200
 // STDERR:
 
 Gdk = imports.gi.Gdk;



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