Yioop_V9.5_Source_Code_Documentation

UtilityTest extends UnitTest
in package

Used to test the various methods in utility, in particular, those related to posting lists and time.

Tags
author

Chris Pollett

Table of Contents

case_name  = "TestCase"
The suffix that all TestCase methods need to have to be called by run()
$current_method  : string
Contains the value of the next test case to be run can be used by setUp
$test_case_results  : array<string|int, mixed>
Used to store the results for each test sub case
$test_objects  : array<string|int, mixed>
Used to hold objects to be used in tests
__construct()  : mixed
Constructor should be overridden to do any set up that occurs before and test cases
assertEqual()  : mixed
Checks that $x and $y are the same, the result of the test is added to $this->test_case_results
assertFalse()  : mixed
Checks that $x can coerced to false, the result of the test is added to $this->test_case_results
assertNotEqual()  : mixed
Checks that $x and $y are not the same, the result of the test is added to $this->test_case_results
assertTrue()  : mixed
Checks that $x can coerced to true, the result of the test is added to $this->test_case_results
checkTimeIntervalTestCase()  : mixed
Determines if the checkTimeInterval method can correctly determine if a time of day is between the times of day of two timestamps
encodeDecodeBitsCodeTestCase()  : mixed
Used to check Encoding decoding using unary coding
encodeDecodeGammaTestCase()  : mixed
Used to check Encoding decoding gamma codes
encodeDecodePositionListTestCase()  : mixed
Used to check Encoding decoding using unary coding
encodeDecodeRiceTestCase()  : mixed
Used to check Encoding decoding using unary coding
encodeDecodeVByteTestCase()  : mixed
Check that encoding and decoding integers using the vByte scheme works
modified9TestCase()  : mixed
Used to check Encoding decoding using Modified9 coding
packUnpackPostingTestCase()  : mixed
Used to check if posting lists can be properly encoded/decoded
run()  : array<string|int, mixed>
Execute each of the test cases of this unit test and return the results
setUp()  : mixed
No set up being done for the time being
tearDown()  : mixed
No tear down being done for the time being
unaryCodeTestCase()  : mixed
Used to check Encoding decoding using unary coding
webencodeWebdecodeTestCase()  : mixed
Checks webencode/webdecode to see inverses. Checks base64Hash/ unbase64Hash to see inverses

Constants

case_name

The suffix that all TestCase methods need to have to be called by run()

public mixed case_name = "TestCase"

Properties

$current_method

Contains the value of the next test case to be run can be used by setUp

public string $current_method

$test_case_results

Used to store the results for each test sub case

public array<string|int, mixed> $test_case_results

$test_objects

Used to hold objects to be used in tests

public array<string|int, mixed> $test_objects

Methods

__construct()

Constructor should be overridden to do any set up that occurs before and test cases

public __construct() : mixed
Return values
mixed

assertEqual()

Checks that $x and $y are the same, the result of the test is added to $this->test_case_results

public assertEqual(mixed $x, mixed $y[, string $description = "" ]) : mixed
Parameters
$x : mixed

a first item to compare

$y : mixed

a second item to compare

$description : string = ""

information about this test subcase

Return values
mixed

assertFalse()

Checks that $x can coerced to false, the result of the test is added to $this->test_case_results

public assertFalse(mixed $x[, string $description = "" ]) : mixed
Parameters
$x : mixed

item to check

$description : string = ""

information about this test subcase

Return values
mixed

assertNotEqual()

Checks that $x and $y are not the same, the result of the test is added to $this->test_case_results

public assertNotEqual(mixed $x, mixed $y[, string $description = "" ]) : mixed
Parameters
$x : mixed

a first item to compare

$y : mixed

a second item to compare

$description : string = ""

information about this test subcase

Return values
mixed

assertTrue()

Checks that $x can coerced to true, the result of the test is added to $this->test_case_results

public assertTrue(mixed $x[, string $description = "" ]) : mixed
Parameters
$x : mixed

item to check

$description : string = ""

information about this test subcase

Return values
mixed

checkTimeIntervalTestCase()

Determines if the checkTimeInterval method can correctly determine if a time of day is between the times of day of two timestamps

public checkTimeIntervalTestCase() : mixed
Return values
mixed

encodeDecodeBitsCodeTestCase()

Used to check Encoding decoding using unary coding

public encodeDecodeBitsCodeTestCase() : mixed
Return values
mixed

encodeDecodeGammaTestCase()

Used to check Encoding decoding gamma codes

public encodeDecodeGammaTestCase() : mixed
Return values
mixed

encodeDecodePositionListTestCase()

Used to check Encoding decoding using unary coding

public encodeDecodePositionListTestCase() : mixed
Return values
mixed

encodeDecodeRiceTestCase()

Used to check Encoding decoding using unary coding

public encodeDecodeRiceTestCase() : mixed
Return values
mixed

encodeDecodeVByteTestCase()

Check that encoding and decoding integers using the vByte scheme works

public encodeDecodeVByteTestCase() : mixed
Return values
mixed

modified9TestCase()

Used to check Encoding decoding using Modified9 coding

public modified9TestCase() : mixed
Return values
mixed

packUnpackPostingTestCase()

Used to check if posting lists can be properly encoded/decoded

public packUnpackPostingTestCase() : mixed
Return values
mixed

run()

Execute each of the test cases of this unit test and return the results

public run([string $method = null ]) : array<string|int, mixed>
Parameters
$method : string = null

if not null then the method to run, else run all methods

Return values
array<string|int, mixed>

test case results

setUp()

No set up being done for the time being

public setUp() : mixed
Return values
mixed

tearDown()

No tear down being done for the time being

public tearDown() : mixed
Return values
mixed

unaryCodeTestCase()

Used to check Encoding decoding using unary coding

public unaryCodeTestCase() : mixed
Return values
mixed

webencodeWebdecodeTestCase()

Checks webencode/webdecode to see inverses. Checks base64Hash/ unbase64Hash to see inverses

public webencodeWebdecodeTestCase() : mixed
Return values
mixed

        

Search results