mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-09 03:31:41 +00:00
18 lines
353 B
C++
18 lines
353 B
C++
#include "common/common_pch.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
#include "tests/unit/util.h"
|
|
|
|
namespace {
|
|
|
|
TEST(MmIo, Slurp) {
|
|
memory_cptr m;
|
|
|
|
ASSERT_NO_THROW(m = mm_file_io_c::slurp("tests/unit/data/text/chunky_bacon.txt"));
|
|
EXPECT_EQ(*m, std::string{"Chunky Bacon\n"});
|
|
|
|
ASSERT_THROW(mm_file_io_c::slurp("doesnotexist"), mtx::mm_io::exception);
|
|
}
|
|
|
|
}
|