|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Ah String Utils. More...
#include <gtest/gtest.h>#include <cstdlib>#include <limits>#include <random>#include <stdexcept>#include <vector>#include <ah-string-utils.H>Go to the source code of this file.
Functions | |
| TEST (util, concat) | |
| TEST (StringUtils, vector_to_string) | |
| TEST (StringUtils, array_to_string) | |
| TEST (StringUtils, trim_variants) | |
| TEST (StringUtils, contains_string_view) | |
| TEST (StringUtils, double_formatting) | |
| TEST (StringUtils, case_conversion_ascii) | |
| TEST (StringUtils, case_conversion_non_ascii_does_not_crash) | |
| TEST (StringUtils, only_alpha_and_removals) | |
| TEST (StringUtils, join_dynlist) | |
| TEST (StringUtils, numeric_parsers) | |
| TEST (StringUtils, prefix_and_remove_prefix) | |
| TEST (StringUtils, to_name) | |
| TEST (StringUtils, split_camel_case) | |
| TEST (StringUtils, split_and_split_string) | |
| TEST (StringUtils, pascal_case) | |
| TEST (StringUtils, split_pos) | |
| TEST (StringUtils, split_n) | |
| TEST (StringUtils, complete_rows) | |
| TEST (StringUtils, format_string_no_underflow) | |
| TEST (StringUtils, format_string_csv) | |
| TEST (StringUtils, text_wrapping_and_shift) | |
| TEST (StringUtils, build_pars_list_variadic) | |
| TEST (StringUtils, build_pars_list_container) | |
| TEST (StringUtils, fill_string) | |
| TEST (StringUtils, split_to_array) | |
| TEST (StringUtils, format_string_computed_lens) | |
| TEST (StringUtils, to_string_matrix_and_lines) | |
| TEST (StringUtils, split_text_into_words_and_lines) | |
| TEST (StringUtils, justify_and_align_except_first) | |
| TEST (StringUtils, numeric_boundaries) | |
| static int | stress_multiplier () |
| static string | random_string (std::mt19937 &rng, size_t len) |
| static string | random_ascii_token (std::mt19937 &rng, size_t len) |
| TEST (StringUtilsStress, split_pos_recomposes) | |
| TEST (StringUtilsStress, split_n_recomposes) | |
| TEST (StringUtilsStress, split_string_tokens_have_no_delims) | |
| TEST (StringUtilsStress, case_conversion_no_crash_and_preserves_length) | |
| TEST (StringUtilsStress, build_pars_list_round_trip_for_ints) | |
Tests for Ah String Utils.
Definition in file ah-string-utils.cc.
|
static |
Definition at line 476 of file ah-string-utils.cc.
References Aleph::maps(), and rng.
|
static |
Definition at line 466 of file ah-string-utils.cc.
References Aleph::maps(), and rng.
|
static |
Definition at line 446 of file ah-string-utils.cc.
References Aleph::maps().
| TEST | ( | StringUtils | , |
| array_to_string | |||
| ) |
Definition at line 73 of file ah-string-utils.cc.
References Aleph::Array< T >::append(), Aleph::maps(), and Aleph::to_string().
| TEST | ( | StringUtils | , |
| build_pars_list_container | |||
| ) |
Definition at line 344 of file ah-string-utils.cc.
References Aleph::DynList< T >::append(), Aleph::build_pars_list(), l, and Aleph::maps().
| TEST | ( | StringUtils | , |
| build_pars_list_variadic | |||
| ) |
Definition at line 338 of file ah-string-utils.cc.
References Aleph::build_pars_list(), and Aleph::maps().
| TEST | ( | StringUtils | , |
| case_conversion_ascii | |||
| ) |
Definition at line 120 of file ah-string-utils.cc.
References Aleph::maps(), Aleph::mutable_tolower(), Aleph::mutable_toupper(), Aleph::tolower(), and Aleph::toupper().
| TEST | ( | StringUtils | , |
| case_conversion_non_ascii_does_not_crash | |||
| ) |
Definition at line 132 of file ah-string-utils.cc.
References Aleph::maps(), Aleph::HTList::size(), and Aleph::to_lower().
| TEST | ( | StringUtils | , |
| complete_rows | |||
| ) |
Definition at line 283 of file ah-string-utils.cc.
References Aleph::DynList< T >::append(), Aleph::complete_rows(), Aleph::maps(), LocateFunctions< Container, Type >::nth(), and Aleph::HTList::size().
| TEST | ( | StringUtils | , |
| contains_string_view | |||
| ) |
Definition at line 105 of file ah-string-utils.cc.
References Aleph::contains(), and Aleph::maps().
| TEST | ( | StringUtils | , |
| double_formatting | |||
| ) |
Definition at line 112 of file ah-string-utils.cc.
References Aleph::maps(), Aleph::to_str(), and Aleph::to_string().
| TEST | ( | StringUtils | , |
| fill_string | |||
| ) |
Definition at line 355 of file ah-string-utils.cc.
References Aleph::fill_string(), and Aleph::maps().
| TEST | ( | StringUtils | , |
| format_string_computed_lens | |||
| ) |
Definition at line 376 of file ah-string-utils.cc.
References Aleph::DynList< T >::append(), Aleph::format_string(), Aleph::maps(), LocateFunctions< Container, Type >::nth(), and Aleph::HTList::size().
| TEST | ( | StringUtils | , |
| format_string_csv | |||
| ) |
Definition at line 313 of file ah-string-utils.cc.
References Aleph::DynList< T >::append(), Aleph::format_string_csv(), Aleph::maps(), LocateFunctions< Container, Type >::nth(), and Aleph::HTList::size().
| TEST | ( | StringUtils | , |
| format_string_no_underflow | |||
| ) |
Definition at line 299 of file ah-string-utils.cc.
References Aleph::DynList< T >::append(), Aleph::format_string(), Aleph::maps(), LocateFunctions< Container, Type >::nth(), and Aleph::HTList::size().
| TEST | ( | StringUtils | , |
| join_dynlist | |||
| ) |
Definition at line 150 of file ah-string-utils.cc.
References Aleph::DynList< T >::append(), Aleph::join(), l, and Aleph::maps().
| TEST | ( | StringUtils | , |
| justify_and_align_except_first | |||
| ) |
Definition at line 421 of file ah-string-utils.cc.
References Aleph::align_text_to_left_except_first(), Aleph::contains(), Aleph::justify_line_except_first(), and Aleph::maps().
| TEST | ( | StringUtils | , |
| numeric_boundaries | |||
| ) |
Definition at line 433 of file ah-string-utils.cc.
References Aleph::is_long(), Aleph::is_size_t(), and Aleph::maps().
| TEST | ( | StringUtils | , |
| numeric_parsers | |||
| ) |
Definition at line 161 of file ah-string-utils.cc.
References Aleph::is_double(), Aleph::is_float(), Aleph::is_long(), Aleph::is_size_t(), and Aleph::maps().
| TEST | ( | StringUtils | , |
| only_alpha_and_removals | |||
| ) |
Definition at line 142 of file ah-string-utils.cc.
References Aleph::maps(), Aleph::only_alpha(), Aleph::remove_spaces(), and Aleph::remove_symbols().
| TEST | ( | StringUtils | , |
| pascal_case | |||
| ) |
Definition at line 255 of file ah-string-utils.cc.
References Aleph::maps(), and Aleph::to_Pascalcase().
| TEST | ( | StringUtils | , |
| prefix_and_remove_prefix | |||
| ) |
Definition at line 187 of file ah-string-utils.cc.
References Aleph::is_prefix(), Aleph::maps(), and Aleph::remove_prefix().
| TEST | ( | StringUtils | , |
| split_and_split_string | |||
| ) |
Definition at line 220 of file ah-string-utils.cc.
References l, Aleph::maps(), LocateFunctions< Container, Type >::nth(), Aleph::HTList::size(), Aleph::split(), and Aleph::split_to_list().
| TEST | ( | StringUtils | , |
| split_camel_case | |||
| ) |
Definition at line 204 of file ah-string-utils.cc.
References Aleph::HTList::is_empty(), Aleph::maps(), LocateFunctions< Container, Type >::nth(), Aleph::HTList::size(), and Aleph::split_camel_case().
| TEST | ( | StringUtils | , |
| split_n | |||
| ) |
Definition at line 270 of file ah-string-utils.cc.
References l, Aleph::maps(), LocateFunctions< Container, Type >::nth(), Aleph::HTList::size(), and Aleph::split_n().
| TEST | ( | StringUtils | , |
| split_pos | |||
| ) |
Definition at line 261 of file ah-string-utils.cc.
References Aleph::maps(), and Aleph::split_pos().
| TEST | ( | StringUtils | , |
| split_text_into_words_and_lines | |||
| ) |
Definition at line 407 of file ah-string-utils.cc.
References l, Aleph::maps(), LocateFunctions< Container, Type >::nth(), Aleph::HTList::size(), Aleph::split_text_into_lines(), Aleph::split_text_into_words(), and w.
| TEST | ( | StringUtils | , |
| split_to_array | |||
| ) |
Definition at line 366 of file ah-string-utils.cc.
References Aleph::maps(), and Aleph::split_to_array().
| TEST | ( | StringUtils | , |
| text_wrapping_and_shift | |||
| ) |
Definition at line 325 of file ah-string-utils.cc.
References Aleph::align_text_to_left(), Aleph::contains(), Aleph::justify_text(), Aleph::maps(), and Aleph::shift_lines_to_left().
| TEST | ( | StringUtils | , |
| to_name | |||
| ) |
Definition at line 197 of file ah-string-utils.cc.
References Aleph::maps(), and Aleph::to_name().
| TEST | ( | StringUtils | , |
| to_string_matrix_and_lines | |||
| ) |
Definition at line 390 of file ah-string-utils.cc.
References Aleph::DynList< T >::append(), Aleph::contains(), Aleph::maps(), and Aleph::to_string().
| TEST | ( | StringUtils | , |
| trim_variants | |||
| ) |
Definition at line 84 of file ah-string-utils.cc.
References Aleph::maps(), Aleph::trim(), and Aleph::trim_in_place().
| TEST | ( | StringUtils | , |
| vector_to_string | |||
| ) |
Definition at line 65 of file ah-string-utils.cc.
References Aleph::maps(), and Aleph::to_string().
| TEST | ( | StringUtilsStress | , |
| build_pars_list_round_trip_for_ints | |||
| ) |
Definition at line 561 of file ah-string-utils.cc.
References Aleph::build_pars_list(), Aleph::maps(), rng, and stress_multiplier().
| TEST | ( | StringUtilsStress | , |
| case_conversion_no_crash_and_preserves_length | |||
| ) |
Definition at line 548 of file ah-string-utils.cc.
References Aleph::maps(), random_string(), rng, Aleph::HTList::size(), stress_multiplier(), Aleph::to_lower(), and Aleph::to_upper().
| TEST | ( | StringUtilsStress | , |
| split_n_recomposes | |||
| ) |
Definition at line 503 of file ah-string-utils.cc.
References FunctionalMethods< Container, T >::for_each(), Aleph::maps(), LocateFunctions< Container, Type >::nth(), random_ascii_token(), rng, Aleph::HTList::size(), Aleph::split_n(), and stress_multiplier().
| TEST | ( | StringUtilsStress | , |
| split_pos_recomposes | |||
| ) |
Definition at line 488 of file ah-string-utils.cc.
References Aleph::maps(), random_ascii_token(), rng, Aleph::split_pos(), and stress_multiplier().
| TEST | ( | StringUtilsStress | , |
| split_string_tokens_have_no_delims | |||
| ) |
Definition at line 522 of file ah-string-utils.cc.
References FunctionalMethods< Container, T >::for_each(), Aleph::HTList::is_empty(), Aleph::maps(), random_ascii_token(), rng, Aleph::HTList::size(), Aleph::split_to_list(), and stress_multiplier().
| TEST | ( | util | , |
| concat | |||
| ) |
Definition at line 55 of file ah-string-utils.cc.
References Aleph::concat(), and Aleph::maps().