Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 9eaab263 authored by Mikaël Salson's avatar Mikaël Salson

Tests: Small test on IKmerStore

parent 071b5b24
#include <core/fasta.h>
#include <core/kmerstore.h>
#include "tests.h"
template<template<class> class Index>
void testInsertOneSeq() {
Index<Kmer> index(4, true);
string seq = "ACAA";
string label = "s";
index.insert(seq, label);
string other1 = "TTGT", other2 = "AACA", other3 = "AAAA",
other4 = "CAAA";
TAP_TEST(index.get(seq).count == 1, TEST_KMERSTORE_INSERT_ONE_SEQ, "");
TAP_TEST(index.get(other1).count == 0, TEST_KMERSTORE_INSERT_ONE_SEQ, "");
TAP_TEST(index.get(other2).count == 0, TEST_KMERSTORE_INSERT_ONE_SEQ, "");
TAP_TEST(index.get(other3).count == 0, TEST_KMERSTORE_INSERT_ONE_SEQ, "");
TAP_TEST(index.get(other4).count == 0, TEST_KMERSTORE_INSERT_ONE_SEQ, "");
}
template<template <class> class T>
void testKmerStoreWithKmerSimple(int k, bool revcomp, int test_id ) {
......@@ -82,6 +100,8 @@ void testKmerStoreSeed() {
}
void testStorage() {
testInsertOneSeq<ArrayKmerStore>();
testInsertOneSeq<MapKmerStore>();
testKmerStoreWithKmerSimple<ArrayKmerStore>(5, false, TEST_ARRAY_KMERSTORE);
testKmerStoreWithKmerSimple<ArrayKmerStore>(5, true, TEST_ARRAY_KMERSTORE_RC);
......
......@@ -32,6 +32,7 @@ enum {
TEST_KMERSTORE_GET_K,
TEST_KMERSTORE_GET_S,
TEST_KMERSTORE_GET_SEED,
TEST_KMERSTORE_INSERT_ONE_SEQ,
/* KmerAffect */
TEST_AFFECT_STRAND,
......@@ -144,6 +145,7 @@ inline void declare_tests() {
RECORD_TAP_TEST(TEST_EXTRACT_BASENAME, "extractBasename()");
RECORD_TAP_TEST(TEST_ARRAY_KMERSTORE, "Testing ArrayKmerStore");
RECORD_TAP_TEST(TEST_KMERSTORE_INSERT_ONE_SEQ, "Testing IKmerStore::insert() on one sequence");
RECORD_TAP_TEST(TEST_MAP_KMERSTORE, "Testing MapKmerStore");
RECORD_TAP_TEST(TEST_ARRAY_KMERSTORE_RC, "Testing ArrayKmerStore with revcomp");
RECORD_TAP_TEST(TEST_MAP_KMERSTORE_RC, "Testing MapKmerStore with revcomp");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment