From 18203b200e8cae81decab27c8ab99e1c1deeef5d Mon Sep 17 00:00:00 2001 From: Piotr Idzik <65706193+vil02@users.noreply.github.com> Date: Sat, 3 Jun 2023 21:07:08 +0200 Subject: [PATCH] Apply suggestions from code review The code after this commit requires reformatting. Co-authored-by: David Leal --- dynamic_programming/longest_common_string.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dynamic_programming/longest_common_string.cpp b/dynamic_programming/longest_common_string.cpp index 38275ea2e..a6a7dad2c 100644 --- a/dynamic_programming/longest_common_string.cpp +++ b/dynamic_programming/longest_common_string.cpp @@ -5,12 +5,16 @@ * the function longest_common_string_length computes the length * of the longest common string which can be created of two input strings * by removing characters from them + * + * @author [Nikhil Arora](https://github.com/nikhilarora068) + * @author [Piotr Idzik](https://github.com/vil02) */ -#include /// for assert -#include /// for std::string -#include /// for std::move -#include /// for std::vector +#include /// for assert +#include /// for std::string +#include /// for std::move +#include /// for std::vector +#include /// for IO operations /** * @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( /** * @brief runs all tests for longest_common_string_length funcion */ -void tests() { +static void tests() { const auto test_cases = get_test_cases(); assert(test_cases.size() > 0); test_longest_common_string_length(test_cases); test_longest_common_string_length_is_symmetric(test_cases); test_longest_common_string_length_for_reversed_inputs(test_cases); + + std::cout << "All tests have successfully passed!\n"; } int main() {