File: TitleTable_gtest.cpp

package info (click to toggle)
pbseqlib 5.3.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,020 kB
  • sloc: cpp: 77,246; python: 331; sh: 103; makefile: 42
file content (33 lines) | stat: -rw-r--r-- 868 bytes parent folder | download | duplicates (5)
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
/*
 * =====================================================================================
 *
 *       Filename:  TitleTable_gtest.cpp
 *
 *    Description:  Test pbdata/metagenome/TitleTable.hpp
 *
 *        Version:  1.0
 *        Created:  11/29/2012 03:34:56 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Yuan Li (yli), yli@pacificbiosciences.com
 *        Company:  Pacific Biosciences
 *
 * =====================================================================================
 */

#include <gtest/gtest.h>

#include <pbdata/testdata.h>
#include <pbdata/metagenome/TitleTable.hpp>

TEST(TitleTable, Read)
{
    TitleTable tt;
    std::string fn = titleTable1;
    tt.Read(fn);
    EXPECT_STREQ(tt.table[0], "ref1 description1");
    EXPECT_STREQ(tt.table[1], "ref2 description2");
    EXPECT_EQ(tt.tableLength, 2);
    tt.Free();
}