8#include "storm-config.h"
17TEST(MappedFileTest, NonExistingFile) {
22TEST(MappedFileTest, BasicFunctionality) {
25 std::string testString =
"This is a test string.";
26 char const* dataPtr = file.
getData();
27 for (
char const* testStringPtr = testString.c_str(); testStringPtr - testString.c_str() < 22; testStringPtr++) {
28 ASSERT_EQ(*testStringPtr, *dataPtr);
38TEST(MappedFileTest, ExistsAndReadble) {
TEST(MappedFileTest, NonExistingFile)
Opens a file and maps it to memory providing a char* containing the file content.
char const * getData() const
Returns a pointer to the beginning of the mapped file data.
char const * getDataEnd() const
Returns a pointer to the end of the mapped file data.
bool fileExistsAndIsReadable(std::string const &filename)
Tests whether the given file exists and is readable.
char const * forwardToLineEnd(char const *buffer)
Encapsulates the usage of function @strcspn to forward to the end of the line (next char is the newli...
char const * forwardToNextLine(char const *buffer)
Encapsulates the usage of function @strchr to forward to the next line.
#define STORM_SILENT_ASSERT_THROW(statement, expected_exception)