-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestLib.h
More file actions
55 lines (47 loc) · 1.85 KB
/
TestLib.h
File metadata and controls
55 lines (47 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
// Created by Toby Dragon on 9/4/18.
//
#ifndef COMP220LAB_TESTLIBRARY_H
#define COMP220LAB_TESTLIBRARY_H
/**
* reports whether ints are equal or not
* @param expected - the value you expect the actual value to be
* @param actual - the actual value to test
* @post prints only "pass" if the values are equal,
* Else it prints "FAIL" and their respective values
*/
void printAssertEquals(int expected, int actual);
/**
* reports whether booleans are equal or not
* @param expected - the value you expect the actual value to be
* @param actual - the actual value to test
* @post prints only "pass" if the values are equal,
* Else it prints "FAIL" and their respective values
*/
void printAssertEquals(bool expected, bool actual);
/**
* reports whether strings are equal or not
* @param expected - the value you expect the actual value to be
* @param actual - the actual value to test
* @post prints only "pass" if the values are equal,
* Else it prints "FAIL" and their respective values
*/
void printAssertEquals(std::string expected, std::string actual);
/**
* reports whether arrays are equal or not
* @param expected - the value you expect the actual value to be
* @param actual - the actual value to test
* @post prints only "pass" if the values are equal,
* Else it prints "FAIL" and the number of array elements that were different
*/
void printAssertEquals(int* a1, int *a2, int size);
/**
* reports whether arrays are equal or not
* @param expected - the array you expect the actual value to be
* @param actual - the actual array to test
* @param size - the number of elements in the arrays to check
* @post prints only "pass" if the arrays are equal,
* Else it prints "FAIL" and the number of values that are different
*/
void printAssertArrayEqual(int* expected, int* actual, int size);
#endif //COMP220LAB_TESTLIBRARY_H