CSC 148H - Fall 2000
University of Toronto - Fall 2000
Department of Computer Science
CSC 148H - INTRODUCTION TO COMPUTER SCIENCE
Testing Strategy for the Project
We ran your project through four phases of testing.
The correct output for every test case is available
here
Phase 1
In this phase, we ran all of your code, and used the input values shown
below.
The two text input files we used were
jabberwalrus and
shake.
- Test 1:
context size: 0
source file: jabberwalrus
initial context: ""
seed: 5
lines of output: 5
- Test 2:
context size: 1
source file: shake
initial context: "W"
seed: 300
lines of output: 5
- Test 3:
context size: 2
source file: shake
initial context: "IS"
seed: 300
lines of output: 5
- Test 4:
context size: 3
source file: jabberwalrus
initial context: "WHA"
seed: 300
lines of output: 5
- Test 5:
context size: 15
source file: shake
initial context: "DENY THY FATHER"
seed: 5
lines of output: 5
Phase 2
In this phase, we ran your driver (Jabtalk), but for the rest of the program,
plugged in our own correct code.
This allows a student whose driver is correct, but who has problems in
the rest of the program, to get some marks for correctness.
- Test 1:
context size: 0
source file: jabberwalrus
initial context: ""
seed: 5
lines of output: 5
- Test 2:
context size: 1
source file: shake
initial context: "Z"
seed: 300
lines of output: 5
- Test 3:
context size: 2
source file: shake
initial context: "WI"
seed: 300
lines of output: 5
- Test 4:
context size: 3
source file: jabberwalrus
initial context: "UFF"
seed: 300
lines of output: 5
- Test 5:
context size: 15
source file: shake
initial context: "THEREFORE THY K"
seed: 5
lines of output: 5
Phase 3
In this phase, we ran our own correct driver (Jabtalk), but for the rest of
the program,
plugged in your code.
This allows a student whose program has a problem in the driver, but
is otherwise correct, to get some marks for correctness.
- Test 1:
context size: 0
source file: jabberwalrus
initial context: ""
seed: 5
lines of output: 5
- Test 2:
context size: 1
source file: jabberwalrus
initial context: "L"
seed: 300
lines of output: 5
- Test 3:
context size: 2
source file: shake
initial context: "BU"
seed: 5
lines of output: 5
- Test 4:
context size: 3
source file: shake
initial context: "DEA"
seed: 300
lines of output: 5
- Test 5:
context size: 15
source file: shake
initial context: "STAY BUT A LITT"
seed: 5
lines of output: 5
In the second part of Phase 3, we forced the various kinds of
exception to occur:
- Test 1:
Jabtalk1.java
forces a StringLengthException in generateChar().
- Test 2:
Jabtalk2.java
forces a ContextNotFoundException in generateChar().
- Test 3:
Jabtalk3.java
forces an IllegalCharException in generateChar().
- Test 4:
Jabtalk4.java
forces a StringLengthException in tally().
- Test 5:
Jabtalk5.java
forces an IllegalCharException in tally().
Phase 4
In this phase, we again used our own driver with your code for the rest of
the program.
But this time the driver was not JabTalk. It was a driver that
made hard-coded calls to tally() to force a certain shape of trie to
be built, and then make a single call to generateChar().
This allows a student whose program produces the correct first character
of output, but then goes wrong later,
to get some marks for correctness.
We did this 10 times, with 10 different drivers, each creating a
trie with a different shape or different frequency values:
- Test 1:
Jabtalk1Spec.java
- Test 2:
Jabtalk2Spec.java
- Test 3:
Jabtalk3Spec.java
- Test 4:
Jabtalk4Spec.java
- Test 5:
Jabtalk5Spec.java
- Test 6:
Jabtalk6Spec.java
- Test 7:
Jabtalk7Spec.java
- Test 8:
Jabtalk8Spec.java
- Test 9:
Jabtalk9Spec.java
- Test 10:
Jabtalk10Spec.java