File: HDFPlsReader_gtest.cpp

package info (click to toggle)
pbseqlib 5.3.5%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,148 kB
  • sloc: cpp: 77,259; python: 331; sh: 103; makefile: 41
file content (49 lines) | stat: -rw-r--r-- 1,237 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * ============================================================================
 *
 *       Filename:  HDFPlsReader_gtest.cpp
 *
 *    Description:  Test hdf/HDFPlsReader.hpp
 *
 *        Version:  1.0
 *        Created:  08/23/2013 11:13:34 AM
 *       Revision:  08/20/2014
 *       Compiler:  gcc
 *
 *         Author:  Yuan Li (yli), yli@pacificbiosciences.com
 *        Company:  Pacific Biosciences
 *
 * ============================================================================
 */

#include <gtest/gtest.h>

#include <pbdata/testdata.h>
#include <hdf/HDFPlsReader.hpp>

using namespace H5;

class HDFPlsReaderTEST : public ::testing::Test
{
public:
    virtual void SetUp()
    {
        fileName = plsFile1;
        ASSERT_EQ(reader.Initialize(fileName), 1);
    }
    virtual void TearDown() { reader.Close(); }
    std::string fileName;
    HDFPlsReader reader;
};

TEST_F(HDFPlsReaderTEST, ReadToPulseFile)
{
    PulseFile pulseFile;
    reader.IncludeField("NumEvent");
    reader.IncludeField("StartFrame");
    reader.ReadPulseFileInit(pulseFile);
    reader.ReadPulseFile(pulseFile);
    //Astro = 1, Springfield = 2
    ASSERT_EQ(pulseFile.platformId, 2);
    ASSERT_EQ(pulseFile.startFrame.size(), 197626964u);
}