Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Functions | Variables
stringutil.cpp File Reference
#include "gmxpre.h"
#include "gromacs/utility/stringutil.h"
#include <string>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/exceptions.h"
#include "testutils/refdata.h"
#include "testutils/stringtest.h"
+ Include dependency graph for stringutil.cpp:

Description

Tests for string utility functions and classes.

For development, the tests can be run with a '-stdout' command-line option to print out the help to stdout instead of using the XML reference framework.

Author
Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com

Typedefs

typedef gmx::test::StringTestBase gmx::test::anonymous_namespace{stringutil.cpp}::TextLineWrapperTest
 Test fixture for gmx::TextLineWrapper.
 

Functions

void gmx::test::anonymous_namespace{stringutil.cpp}::checkEqualCaseInsensitive (const std::string &foo, const std::string &bar, int length, bool expectedResult)
 Helper to test that string comparison works with switched input positions. More...
 

Variables

const char gmx::test::anonymous_namespace{stringutil.cpp}::g_wrapText [] = "A quick brown fox jumps over the lazy dog"
 Simple test string for wrapping.
 
const char gmx::test::anonymous_namespace{stringutil.cpp}::g_wrapText2 [] = "A quick brown fox jumps\nover the lazy dog"
 Test string for wrapping with embedded line breaks.
 
const char gmx::test::anonymous_namespace{stringutil.cpp}::g_wrapText3 [] = "A quick brown fox jumps\n\nover the lazy dog"
 Test string for wrapping with embedded line breaks and an empty line.
 
const char gmx::test::anonymous_namespace{stringutil.cpp}::g_wrapTextLongWord []
 Test string for wrapping with a long word. More...
 
const char gmx::test::anonymous_namespace{stringutil.cpp}::g_wrapTextWhitespace [] = " A quick brown fox jumps \n over the lazy dog"
 Test string for wrapping with extra whitespace.