Revert "tests add to namespace sls (#464)" (#465)

This reverts commit f5745fcf18.
This commit is contained in:
Dhanya Thattil
2022-05-20 15:43:48 +02:00
committed by GitHub
parent f5745fcf18
commit 8656eeec25
44 changed files with 228 additions and 350 deletions

View File

@ -7,12 +7,10 @@
#include <unistd.h>
#include <vector>
namespace sls {
TEST_CASE("Get size of empty file") {
char fname[] = "temfile_XXXXXX";
std::ifstream ifs(fname);
auto size = getFileSize(ifs);
auto size = sls::getFileSize(ifs);
REQUIRE(size <= 0); // -1 or zero
}
@ -24,9 +22,7 @@ TEST_CASE("Get size of file with data") {
write(fh, data.data(), n_bytes);
std::ifstream ifs(fname);
auto size = getFileSize(ifs);
auto size = sls::getFileSize(ifs);
REQUIRE(size == n_bytes);
REQUIRE(ifs.tellg() == 0); // getting size resets pos!
}
} // namespace sls