[perl-Glib-Object-Introspection] Use require() to load the test setup program
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] Use require() to load the test setup program
- Date: Tue, 9 Nov 2010 23:06:10 +0000 (UTC)
commit fc53f9bc106193b6dd496043f0bd5ef200a9de70
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Wed Nov 10 00:04:20 2010 +0100
Use require() to load the test setup program
do() swallows errors.
t/arrays.t | 2 +-
t/basic-types.t | 2 +-
t/inc/setup.pl | 6 ++++--
3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/t/arrays.t b/t/arrays.t
index 75818a2..666b835 100644
--- a/t/arrays.t
+++ b/t/arrays.t
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
-BEGIN { do './t/inc/setup.pl' };
+BEGIN { require './t/inc/setup.pl' };
use strict;
use warnings;
diff --git a/t/basic-types.t b/t/basic-types.t
index ab233dc..e7c516d 100644
--- a/t/basic-types.t
+++ b/t/basic-types.t
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
-BEGIN { do './t/inc/setup.pl' };
+BEGIN { require './t/inc/setup.pl' };
use strict;
use warnings;
diff --git a/t/inc/setup.pl b/t/inc/setup.pl
index 0d9f164..dace880 100644
--- a/t/inc/setup.pl
+++ b/t/inc/setup.pl
@@ -16,6 +16,8 @@ Glib::Object::Introspection->setup(
# Inspired by Test::Number::Delta
sub delta_ok ($$;$) {
- my ($a, $b, $msg) = @_;
- ok (abs ($a - $b) < 1e-6, $msg);
+ my ($a, $b, $msg) = @_;
+ ok (abs ($a - $b) < 1e-6, $msg);
}
+
+1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]