mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
wip
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
#include "catch.hpp"
|
||||
#include "sls/file_utils.h"
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
TEST_CASE("Get size of empty file") {
|
||||
char fname[] = "temfile_XXXXXX";
|
||||
int fh = mkstemp(fname);
|
||||
std::ifstream ifs(fname);
|
||||
auto size = sls::getFileSize(ifs);
|
||||
REQUIRE(size == 0);
|
||||
@ -23,6 +22,5 @@ TEST_CASE("Get size of file with data") {
|
||||
std::ifstream ifs(fname);
|
||||
auto size = sls::getFileSize(ifs);
|
||||
REQUIRE(size == n_bytes);
|
||||
REQUIRE(ifs.tellg() == 0); //getting size resets pos!
|
||||
REQUIRE(ifs.tellg() == 0); // getting size resets pos!
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user