Skip to content

Latest commit

 

History

History
151 lines (142 loc) · 3.55 KB

Isol8Testing.md

File metadata and controls

151 lines (142 loc) · 3.55 KB

ISOL8 Test Cases and Examples

Table of Contents



1. Declaring Variables

Test Case Code Block Expected Result Actual Result Pass? (Y/N)
Null integer variable 1.1 Compiles successfully <- Y
Integer with maximum signed value (+2^31 -1) 1.2 Compiles successfully <- Y
Integer with minimum signed value (-2^31) 1.3 Compiles successfully <- Y
Integer with value over maximum signed 32bit value 1.4 ? Compiler error: TYPE_MISMATCH ?
Integer with value over minimum signed 32bit value 1.5 ? Compiles successfully ?
Empty string 1.6 Compiles successfully Compiler error: A2047 N
String containing data 1.7 Compiles successfully <- Y
Creating a null pointer 1.8 Compiles successfully <- Y
All code blocks have the Initial() method redacted to improve readability, unless stated otherwise.

1.1 Code Block

testVar as int null;

1.2 Code Block

testVar as int 2147483647;

1.3 Code Block

testVar as int -2147483648;

1.4 Code Block

testVar as int 2147483648;

1.5 Code Block

testVar as int -2147483649;

1.6 Code Block

testVar as string "";

1.7 Code Block

testVar as string "Hello World";

1.8 Code Block

testVar as ptr null;


2. Maths Operations

Test Case Code Block Expected Result Actual Result Pass? (Y/N)


3. Input/Output Operations

Test Case Code Block Expected Result Actual Result Pass? (Y/N)
Printing null integer to console 2.1 Compiles successfully, prints 0 to console <- Y
Printing integer with max signed 32bit value 2.2 Compiles successfully, prints correct value <- Y
Printing integer with min signed 32bit value 2.3 Compiles successfully, prints correct value <- Y
Printing integer with value over max signed 32bit value 2.4 ? Compiler Error: TYPE_MISMATCH ?
Printing integer with value over minimum signed 32bit value 2.5 ? Compiler Error: TYPE_MISMATCH ?
Printing empty string 2.5 Compiles successfully, prints nothing to console Compiler error due to 1.6 N
Printing string with content 2.6 Compiles successfully, prints content of string to console <- Y


2.1 Code Block

a as int null;
Initial() ret int
{
	out(a);
	ret 0;
}

2.2 Code Block

a as int 2147483647;
Initial() ret int
{
	out(a);
	ret 0;
}

2.3 Code Block

a as int -2147483648;
Initial() ret int
{
	out(a);
	ret 0;
}

2.4 Code Block

a as int 2147483648;
Initial() ret int
{
	out(a);
	ret 0;
}

2.5 Code Block

a as int -2147483649;
Initial() ret int
{
	out(a);
	ret 0;
}

4. Pointers

Test Case Code Block Expected Result Actual Result Pass? (Y/N)