libStatGen Software  1
TestEquals.h
00001 /*
00002  *  Copyright (C) 2010  Regents of the University of Michigan
00003  *
00004  *   This program is free software: you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation, either version 3 of the License, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License
00015  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #include "SamFile.h"
00019 void testSeqEquals();
00020 
00021 class EqualsTest
00022 {
00023 public:
00024     enum FileType{SAM, BAM};
00025     static void testEq(FileType inputType);
00026     
00027 private:
00028     static void reset();
00029 
00030     static void validateEqRead(SamRecord& samRecord, 
00031                                int readIndex,
00032                                const char* actualExpectedSequence);
00033     static void validateEqReadBuffer(SamRecord& samRecord, 
00034                                      const char* expectedSequence);
00035 
00036     static const char* READ_NAMES[];
00037     static const char* READ_SEQS_BASES[];
00038     static const char* READ_SEQS_EQUALS[];
00039     static const char* READ_SEQS_MIXED[];
00040 
00041     static const char* expectedReferenceName;
00042     static const char* expectedMateReferenceName;
00043     static const char* expectedMateReferenceNameOrEqual;
00044     static const char* expectedCigar;
00045     static const char* expectedQuality;
00046 
00047     static std::vector<unsigned int> expectedCigarHex;
00048 
00049     static int expected0BasedAlignmentEnd;
00050     static int expected1BasedAlignmentEnd;
00051     static int expectedAlignmentLength;
00052     static int expected0BasedUnclippedStart;
00053     static int expected1BasedUnclippedStart;
00054     static int expected0BasedUnclippedEnd;
00055     static int expected1BasedUnclippedEnd;
00056 
00057     static bamRecordStruct expectedRecord;
00058 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends