1#include "storm-config.h"
11TEST(MappedFileTest, NonExistingFile) {
16TEST(MappedFileTest, BasicFunctionality) {
19 std::string testString =
"This is a test string.";
20 char const* dataPtr = file.
getData();
21 for (
char const* testStringPtr = testString.c_str(); testStringPtr - testString.c_str() < 22; testStringPtr++) {
22 ASSERT_EQ(*testStringPtr, *dataPtr);
32TEST(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)