File: 01-basic.t

package info (click to toggle)
libai-decisiontree-perl 0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 368 kB
  • sloc: perl: 414; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

use Test;
BEGIN { plan tests => 7 }

use AI::DecisionTree::Instance;
ok(1);

my $i = AI::DecisionTree::Instance->new([1, 2], 0, "foo");
ok $i->value_int(0), 1;
ok $i->value_int(1), 2;
ok $i->result_int, 0;

$i->set_value(0, 3);
ok $i->value_int(0), 3;

$i = new AI::DecisionTree::Instance([4], 2, "bar");
ok $i->value_int(0), 4;
ok $i->result_int, 2;