File: Read2DTest.cpp

package info (click to toggle)
bornagain 23.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,936 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 318; ruby: 173; xml: 130; makefile: 51; ansic: 24
file content (14 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "BATesting.h"

#include "Device/Data/Datafield.h"
#include "Device/IO/IOFactory.h"
#include "Tests/GTestWrapper/google_test.h"

TEST(Read2D, readSANSRaw)
{
    const auto fname = BATesting::ExampleDataDir + "/scatter2d/SANSDRaw.001";
    Datafield data = IO::readData2D(fname, IO::Filetype2D::nicos2D);
    EXPECT_EQ(data.rank(), 2);
    EXPECT_EQ(data.size(), 16384);
    EXPECT_EQ(data[128 * 62 + 70], 443);
}