Skip to content

Commit

Permalink
Removed logic in non implemented combinations for MS SINGLE
Browse files Browse the repository at this point in the history
  • Loading branch information
3F committed Aug 9, 2020
1 parent d2fb0b6 commit 1ec1822
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 48 deletions.
11 changes: 1 addition & 10 deletions regXwild/core/ESS/AlgorithmEss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,10 @@ bool AlgorithmEss::search(const tstring& text, const tstring& filter, bool ignor
|| (item.mask.curr & ONE && item.mask.prev & ONE)
|| (item.mask.curr & MORE && item.mask.prev & MORE))
{
++item.overlay;
++item.overlay;
}
else{ item.overlay = 0; }

// disable all combinations for SINGLE. TODO: stub - _stubSINGLECombination()
if( (item.mask.prev & (BOL | EOL)) == 0 &&
(
(item.mask.curr & SINGLE && (item.mask.prev & SINGLE) == 0) ||
(item.mask.prev & SINGLE && (item.mask.curr & SINGLE) == 0) ))
{
if(rewindToNextBlock(it)){ continue; } return false;
}

++item.pos;

// TODO: implement non-sequential MS combinations ~ unsigned short int ..
Expand Down
38 changes: 0 additions & 38 deletions regXwildTest/AlgorithmEssTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,44 +882,6 @@ namespace regXwildTest
}
}

/* behaviour by default for non implemented combinations - SINGLE */
TEST_METHOD(stubSINGLECombinationTest1)
{
tstring data = _T("new tes;ted project-12, and 75_protection of various systems");

// MS combination
{
//TODO: implement *,>,?,+,# and combination
{
/* true: */

// *
{
Assert::AreEqual(false, searchEss(data, _T("*#")));
Assert::AreEqual(false, searchEss(data, _T("*#*")));
Assert::AreEqual(false, searchEss(data, _T("#*")));
Assert::AreEqual(false, searchEss(data, _T("*#systems")));
Assert::AreEqual(false, searchEss(data, _T("new*#*systems")));
Assert::AreEqual(false, searchEss(data, _T("*new#*systems*")));
Assert::AreEqual(false, searchEss(data, _T("new#*systems")));
Assert::AreEqual(false, searchEss(data, _T("75*#protection")));
Assert::AreEqual(false, searchEss(data, _T("75*#*protection")));
Assert::AreEqual(false, searchEss(data, _T("new*#systems")));
Assert::AreEqual(false, searchEss(data, _T("*new#*#systems*")));
}

/* false */
{
Assert::AreEqual(false, searchEss(data, _T("*new#systems*")));
Assert::AreEqual(false, searchEss(data, _T("*new##systems*")));
Assert::AreEqual(false, searchEss(data, _T("systems*#")));
Assert::AreEqual(false, searchEss(data, _T("pro#*ject")));
Assert::AreEqual(false, searchEss(data, _T("systems#*")));
}
}
}
}

/* behaviour by default for non implemented combinations - END */
TEST_METHOD(stubENDCombinationTest1)
{
Expand Down

0 comments on commit 1ec1822

Please sign in to comment.