History of TestingSuites

Version 3

TestingSuites

Created by: Stephan Borg, Last modification: 21 Aug 2004 (23:57 UTC) by Stephan Borg
Under the kernel/test/ directory, you will find an attempt at our first testing suite.

This is supposed to be a quick explanation on how it works.

A lot of this based on the ideas of Object Orientation or 'black box' design, which basically means each class is designed so you only need to know what goes into it and what should come out of it. Here is a simple PHP object to explain how this works:
{CODE(colors=>php)}
class MyClass {
// internal variable - should never be accessed
// externally.
var mText;
// initialisation - set default text to "not-set"
function MyClass() {
$this->mText = "not-set";
}
// set the text using this function
function setText($x) {
$this->mText = $x;
}
// get the text using this function
function getText() {
return $this->mText;
}
}{CODE}
It is recommended that you (almost) never access internal variables and hence will never need to know the internals of the class. Secondly, if everything goes through functions, you can check it going in to make sure its not going to break things.
Page History
Date/CommentUserIPVersion
11 Mar 2006 (11:48 UTC)
corrected typo
Uwe Zimmermann87.96.133.21914
Current • Source
Jan Lindåker81.229.122.24913
View • Compare • Difference • Source
Jan Lindåker192.16.134.6611
View • Compare • Difference • Source
Jan Lindåker81.226.206.1989
View • Compare • Difference • Source
Stephan Borg218.214.1.1138
View • Compare • Difference • Source
Stephan Borg218.214.1.1137
View • Compare • Difference • Source
Stephan Borg218.214.1.1136
View • Compare • Difference • Source
Stephan Borg218.214.1.1135
View • Compare • Difference • Source
Stephan Borg218.214.1.1134
View • Compare • Difference • Source
Stephan Borg218.214.1.1133
View • Compare • Difference • Source
Stephan Borg218.214.1.1132
View • Compare • Difference • Source