Files
epics-base/test/tools/Breaktable.plt
Andrew Johnson 044b7a31ef Use @TOP@ and @ARCH@ in .plt files
No need for msi-copy(.exe) as a result.
Tests should now work with INSTALL_LOCATION set, and
don't need to use databaseModuleDirs either.
2017-09-22 14:27:14 -05:00

22 lines
632 B
Prolog

#!/usr/bin/env perl
use lib '@TOP@/lib/perl';
use Test::More tests => 9;
use DBD::Breaktable;
my $bpt = DBD::Breaktable->new('test');
isa_ok $bpt, 'DBD::Breaktable';
is $bpt->name, 'test', 'Breakpoint table name';
is $bpt->points, 0, 'Points == zero';
$bpt->add_point(0, 0.5);
is $bpt->points, 1, 'First point added';
is_deeply $bpt->point(0), [0, 0.5], 'First point correct';
$bpt->add_point(1, 1.5);
is $bpt->points, 2, 'Second point added';
is_deeply $bpt->point(0), [0, 0.5], 'First point still correct';
is_deeply $bpt->point(1), [1, 1.5], 'Second point correct';
is_deeply $bpt->point(2), undef, 'Third point undefined';