Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dr. Michael Petter
LLVM-abstractinterpretation
Commits
a7872c48
Verified
Commit
a7872c48
authored
May 01, 2020
by
Tim Gymnich
Browse files
fixed tests
parent
da25a9cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
a7872c48
...
...
@@ -212,7 +212,7 @@ add_test(NAME normalizedConjunctionTest
COMMAND normalized_conjunction_test
)
add_test
(
NAME
affineRelation
Test
add_test
(
NAME
linearSubspace
Test
COMMAND linear_subspace_test
)
...
...
test/linear_subspace_test.cpp
View file @
a7872c48
...
...
@@ -16,6 +16,16 @@ public:
static
bool
runTestLeastUpperBound2
();
};
const
llvm
::
Value
*
x1
=
(
llvm
::
Value
*
)
1
;
const
llvm
::
Value
*
x2
=
(
llvm
::
Value
*
)
2
;
const
llvm
::
Value
*
x3
=
(
llvm
::
Value
*
)
3
;
const
std
::
unordered_map
<
llvm
::
Value
const
*
,
int
>
mock_index
=
{
{
x1
,
1
},
{
x2
,
2
},
{
x3
,
3
},
};
bool
LinearSubspaceTest
::
runTestLeastUpperBound1
()
{
std
::
cout
<<
"Testing least upper bound 1: "
;
bool
result
=
false
;
...
...
@@ -23,10 +33,12 @@ bool LinearSubspaceTest::runTestLeastUpperBound1() {
LinearSubspace
r1
=
LinearSubspace
();
r1
.
isBottom
=
false
;
r1
.
basis
=
{
MatrixType
(
4
)};
r1
.
index
=
mock_index
;
LinearSubspace
r2
=
LinearSubspace
();
r2
.
isBottom
=
false
;
r2
.
basis
=
{
MatrixType
(
4
)};
r2
.
index
=
mock_index
;
LinearSubspace
expected
=
LinearSubspace
();
expected
.
basis
=
{
MatrixType
(
4
)};
...
...
@@ -50,12 +62,14 @@ bool LinearSubspaceTest::runTestLeastUpperBound2() {
b1
.
setValue
(
0
,
1
,
1
);
b1
.
setValue
(
2
,
1
,
1
);
r1
.
basis
=
{
b1
};
r1
.
index
=
mock_index
;
LinearSubspace
r2
=
LinearSubspace
();
r2
.
isBottom
=
false
;
MatrixType
b2
=
MatrixType
(
4
);
b2
.
setValue
(
0
,
3
,
1
);
r2
.
basis
=
{
b2
};
r2
.
index
=
mock_index
;
LinearSubspace
expected
=
LinearSubspace
();
MatrixType
e1
=
MatrixType
(
4
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment