diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-10-29 21:51:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 21:51:18 -0500 |
commit | 21fd193bdaad1a952845326aa1c84654cfce1503 (patch) | |
tree | 5d7732c5442dc73120352eb25ed92af9806c0751 /test/unit | |
parent | 3596632eef07dbe28ea4a4f166c18ad9fe26d4e0 (diff) |
Update api::Sort to use TypeNode instead of Type (#5363)
This is work towards removing the old API.
This makes TypeNode the backend for Sort instead of Type.
It also updates a unit test for methods isUninterpretedSortParameterized and getUninterpretedSortParamSorts whose implementation was previously buggy due to the implementation of Type-level SortType.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/api/sort_black.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/unit/api/sort_black.h b/test/unit/api/sort_black.h index 60b2dd299..e6d712191 100644 --- a/test/unit/api/sort_black.h +++ b/test/unit/api/sort_black.h @@ -243,7 +243,10 @@ void SortBlack::testGetUninterpretedSortName() void SortBlack::testIsUninterpretedSortParameterized() { Sort uSort = d_solver.mkUninterpretedSort("u"); - TS_ASSERT_THROWS_NOTHING(uSort.isUninterpretedSortParameterized()); + TS_ASSERT(!uSort.isUninterpretedSortParameterized()); + Sort sSort = d_solver.mkSortConstructorSort("s", 1); + Sort siSort = sSort.instantiate({uSort}); + TS_ASSERT(siSort.isUninterpretedSortParameterized()); Sort bvSort = d_solver.mkBitVectorSort(32); TS_ASSERT_THROWS(bvSort.isUninterpretedSortParameterized(), CVC4ApiException&); @@ -253,6 +256,9 @@ void SortBlack::testGetUninterpretedSortParamSorts() { Sort uSort = d_solver.mkUninterpretedSort("u"); TS_ASSERT_THROWS_NOTHING(uSort.getUninterpretedSortParamSorts()); + Sort sSort = d_solver.mkSortConstructorSort("s", 2); + Sort siSort = sSort.instantiate({uSort, uSort}); + TS_ASSERT(siSort.getUninterpretedSortParamSorts().size() == 2); Sort bvSort = d_solver.mkBitVectorSort(32); TS_ASSERT_THROWS(bvSort.getUninterpretedSortParamSorts(), CVC4ApiException&); } |