Skip to content

Commit 18203b2

Browse files
vil02Panquesito7
andauthored
Apply suggestions from code review
The code after this commit requires reformatting. Co-authored-by: David Leal <halfpacho@gmail.com>
1 parent 8ca74d2 commit 18203b2

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

dynamic_programming/longest_common_string.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
* the function longest_common_string_length computes the length
66
* of the longest common string which can be created of two input strings
77
* by removing characters from them
8+
*
9+
* @author [Nikhil Arora](https://github.com/nikhilarora068)
10+
* @author [Piotr Idzik](https://github.com/vil02)
811
*/
912

10-
#include <cassert> /// for assert
11-
#include <string> /// for std::string
12-
#include <utility> /// for std::move
13-
#include <vector> /// for std::vector
13+
#include <cassert> /// for assert
14+
#include <string> /// for std::string
15+
#include <utility> /// for std::move
16+
#include <vector> /// for std::vector
17+
#include <iostream> /// for IO operations
1418

1519
/**
1620
* @brief computes the length of the longest common string created from input
@@ -128,12 +132,14 @@ void test_longest_common_string_length_for_reversed_inputs(
128132
/**
129133
* @brief runs all tests for longest_common_string_length funcion
130134
*/
131-
void tests() {
135+
static void tests() {
132136
const auto test_cases = get_test_cases();
133137
assert(test_cases.size() > 0);
134138
test_longest_common_string_length(test_cases);
135139
test_longest_common_string_length_is_symmetric(test_cases);
136140
test_longest_common_string_length_for_reversed_inputs(test_cases);
141+
142+
std::cout << "All tests have successfully passed!\n";
137143
}
138144

139145
int main() {

0 commit comments

Comments
 (0)