ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/test/test_Tool.pm
Revision: 1.1.2.2
Committed: Fri May 5 14:05:08 2000 UTC (25 years ago) by williamc
Content type: text/plain
Branch: V0_9branch
CVS Tags: V0_12_12_4, V0_12_12_3, V0_12_12_2, V0_12_12_1, V0_12_12_0, PlayGround_0, V0_13_0, V0_12_12, V0_12_11, V0_12_9b, V0_12_10, V0_12_9, V0_12_8, V0_12_7, V0_12_6, V0_12_5, V0_12_4
Branch point for: HPWbranch
Changes since 1.1.2.1: +5 -4 lines
Log Message:
fix restoration of type

File Contents

# User Rev Content
1 williamc 1.1.2.1 #
2     # Tool.pm test suite
3     #
4    
5     package BuildSystem::test::test_Tool;
6     require 5.001;
7     use BuildSystem::Tool;
8    
9     @ISA = ("Utilities::TestClass"); #methods both from the test class
10    
11     sub init {
12     my $self=shift;
13     $self->{testfile}=$self->datadir()."/SimpleDocTest";
14     }
15    
16     sub test {
17     my $self=shift;
18     $self->newtest("Initiation test");
19     $self->newobject();
20     $self->testinterface("name","testname");
21     $self->testinterface("version","V1");
22     $self->_testgeneral();
23    
24     $self->newtest("Feature Testing");
25     $self->testinterface("addfeature","testfeature1","testvalue1" );
26     $self->testinterface("addfeature","testfeature2","testvalue2" );
27     $self->testinterface("addfeature","testfeature3","testvalue3" );
28     $self->testinterface("type","testfeature2","typeA" );
29     $self->testinterface("type","testfeature3","typeA" );
30     $self->_testfeature();
31    
32    
33     $self->newtest("Persistency Testing");
34     my $savefile=$self->temparea()."/".$self->newfilename();
35     $self->testinterface("store",$savefile);
36     undef $self->{object};
37     $self->newobject();
38     $self->testinterface("restore",$savefile);
39     $self->_testgeneral();
40     $self->_testfeature();
41 williamc 1.1.2.2
42     $self->newtest("Type listing test");
43     $self->expect("testfeature2","testfeature3");
44     $self->testinterface("listtype","typeA");
45     $self->clearexpect();
46 williamc 1.1.2.1 }
47    
48     sub _testgeneral {
49     my $self=shift;
50     $self->expect("testname");
51     $self->testinterface("name");
52     $self->clearexpect();
53     $self->expect("V1");
54     $self->testinterface("version");
55     $self->clearexpect();
56     }
57    
58     sub _testfeature {
59     my $self=shift;
60     $self->expect("testvalue1");
61     $self->testinterface("getfeature","testfeature1" );
62     $self->clearexpect();
63     $self->expect("testvalue2");
64     $self->testinterface("getfeature","testfeature2" );
65     $self->clearexpect();
66     $self->expect("typeA");
67     $self->testinterface("type","testfeature2","typeA" );
68     $self->clearexpect();
69     }