File: hmm.t

package info (click to toggle)
psortb 3.0.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 121,044 kB
  • sloc: perl: 3,652; ansic: 698; cpp: 338; sh: 27; makefile: 23
file content (28 lines) | stat: -rw-r--r-- 864 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test::More;
BEGIN { plan tests => 5 };

BEGIN { use_ok('Algorithm::HMM'); }

ok(1); # If we made it this far, we're ok.

#########################

# Insert your test code below, the Test module is use()ed here so read
# its man page ( perldoc Test ) for help writing this test script.

print("Creating new Algorithm::HMM\n");
my $hmm = new Algorithm::HMM(Model => 'sample.hmm');
ok(ref($hmm) ne "", "Ensuring we could load a model");

print("Saving model...\n");
ok(($hmm->save("sample.hmm.1") == 0), "Testing saving a model");

print("Loading saved model...\n");
ok(($hmm->load("sample.hmm.1") == 0), "Testing reloading a model");