t/141-resize.t: do not compare float values directly. use i3test.pm::cmp_float which compares using precision of 1e-6.

This commit is contained in:
Pavel Löbl
2012-05-05 17:28:42 +02:00
committed by Michael Stapelberg
parent 6bbcddab29
commit 8557b05a2c
2 changed files with 31 additions and 22 deletions

View File

@ -33,6 +33,7 @@ our @EXPORT = qw(
open_floating_window
get_dock_clients
cmd
cmp_float
sync_with_i3
does_i3_live
exit_gracefully
@ -563,6 +564,14 @@ sub launch_with_config {
return $i3_pid;
}
# compares two floats and return true if they differ less
# then 1e-6
sub cmp_float {
my ($a, $b) = @_;
return abs($a - $b) < 1e-6;
}
package i3test::X11;
use parent 'X11::XCB::Connection';