-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Johannes Kalmbach <[email protected]>
- Loading branch information
Showing
8 changed files
with
97 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
// | ||
// Created by kalmbacj on 2/6/25. | ||
// | ||
|
||
#include <gmock/gmock.h> | ||
|
||
#include "../util/IdTableHelpers.h" | ||
#include "engine/NamedQueryCache.h" | ||
|
||
TEST(NamedQueryCache, basicWorkflow) { | ||
NamedQueryCache cache; | ||
EXPECT_EQ(cache.numEntries(), 0); | ||
auto table = makeIdTableFromVector({{3, 7}, {9, 11}}); | ||
using V = Variable; | ||
VariableToColumnMap varColMap{{V{"?x"}, makeAlwaysDefinedColumn(0)}, | ||
{V{"?y"}, makeAlwaysDefinedColumn(1)}}; | ||
NamedQueryCache::Value value{ | ||
std::make_shared<const IdTable>(table.clone()), varColMap, {1, 0}}; | ||
cache.store("query-1", std::move(value)); | ||
EXPECT_EQ(cache.numEntries(), 1); | ||
} |