Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Matthew P. Russell
unit_test
Commits
2ff03310
Commit
2ff03310
authored
Jan 06, 2021
by
Matthew P. Russell
Browse files
Update ArrayList_tests.cpp
parent
197ea4ef
Changes
1
Show whitespace changes
Inline
Side-by-side
example/ArrayList_tests.cpp
View file @
2ff03310
...
@@ -41,7 +41,7 @@ NB: The ArrayList code has bugs, so the tests will fail first on purpose!
...
@@ -41,7 +41,7 @@ NB: The ArrayList code has bugs, so the tests will fail first on purpose!
/*
/*
* constructor test 0 - make sure no fatal errors/memory leaks in the default constructor
* constructor test 0 - make sure no fatal errors/memory leaks in the default constructor
*/
*/
void
constructor_0
(){
void
constructor_0
()
{
ArrayList
list
=
ArrayList
();
ArrayList
list
=
ArrayList
();
}
}
...
@@ -49,7 +49,7 @@ void constructor_0(){
...
@@ -49,7 +49,7 @@ void constructor_0(){
* constructor test 1 - make sure no items exist in the list upon construction
* constructor test 1 - make sure no items exist in the list upon construction
* note: given the provided code, this test should fail.
* note: given the provided code, this test should fail.
*/
*/
void
constructor_1
(){
void
constructor_1
()
{
ArrayList
list
=
ArrayList
();
ArrayList
list
=
ArrayList
();
assert
(
list
.
numitems
()
==
0
);
assert
(
list
.
numitems
()
==
0
);
}
}
...
@@ -58,7 +58,7 @@ void constructor_1(){
...
@@ -58,7 +58,7 @@ void constructor_1(){
* destructor test (destructor called implicitly)
* destructor test (destructor called implicitly)
* make sure no fatal errors/memory leaks in the destructor (based on default constructor)
* make sure no fatal errors/memory leaks in the destructor (based on default constructor)
*/
*/
void
destructor
(){
void
destructor
()
{
ArrayList
list
=
ArrayList
();
ArrayList
list
=
ArrayList
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment