Skip to content

Commit c7a1b6f

Browse files
committed
clang-format and clang-tidy fixes for 2205c6f
1 parent 8e05171 commit c7a1b6f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

data_structures/test_stack.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ int main() {
1010
std::cout
1111
<< "---------------------- Test isEmptyStack ----------------------"
1212
<< std::endl;
13-
if (stk.isEmptyStack())
13+
if (stk.isEmptyStack()) {
1414
std::cout << "PASS" << std::endl;
15-
else
15+
} else {
1616
std::cout << "FAIL" << std::endl;
17+
}
1718
std::cout << "---------------------- Test push ----------------------"
1819
<< std::endl;
1920
std::cout << "After pushing 10 20 30 40 into stack: " << std::endl;
@@ -25,10 +26,11 @@ int main() {
2526
std::cout << "---------------------- Test top ----------------------"
2627
<< std::endl;
2728
int value = stk.top();
28-
if (value == 40)
29+
if (value == 40) {
2930
std::cout << "PASS" << std::endl;
30-
else
31+
} else {
3132
std::cout << "FAIL" << std::endl;
33+
}
3234
std::cout << "---------------------- Test pop ----------------------"
3335
<< std::endl;
3436
stk.display();

data_structures/test_stack_students.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
#include <string>
1616

1717
#include "./stack.hpp"
18+
#include "math.h"
1819

1920
int main(int argc, char* argv[]) {
20-
double GPA;
21-
double highestGPA;
21+
double GPA = NAN;
22+
double highestGPA = NAN;
2223
std::string name;
2324

2425
assert(argc == 2);

0 commit comments

Comments
 (0)