40 Commits

Author SHA1 Message Date
yoni206
24663f1c4b Translating API tests to Python — part 2 (#7651)
This PR translates the remaining cpp API tests to python.
2021-12-01 01:38:45 +00:00
Andres Noetzli
7c784424b5 Always enable API black box unit tests (#7696)
Currently, when assertions are disabled, we do not enable any unit
tests. However, we have decided that it would be beneficial to do black
box unit testing of the API even when building cvc5 without assertions,
because the API is user facing. This commit makes the following changes:

- Always enables API black box unit tests
- Adds a test to check whether a buggy version of Clang is being used,
  which prevents the use of `-fno-access-control` for white box tests
- Fixes a spooky variable name in a Python unit test
2021-11-24 22:02:05 +00:00
yoni206
40272d5f3a Translating API tests to Python — part 1 (#7597)
This PR translates some of the API tests from here to Python. The other tests are translated in a private branch and will be added in a separate PR.
2021-11-16 18:56:37 +00:00
yoni206
338982182d Move toPythonObj tests to the new API unit test directory (#6656)
This is the last test file that we move from the old directory to the new one, and so the old directory is deleted.
2021-06-02 16:47:09 +00:00
yoni206
6edc06b3fb Update toPythonObj to use new getters -- part 1 (#6623)
Following #6496 , this PR adds new getters to the python API, as well as tests for them. This makes toPythonObj simpler.

A future PR will add more getters to the python API.

Co-authored-by: Gereon Kremer nafur42@gmail.com
2021-05-31 00:56:14 +00:00
yoni206
40089fc794 Python API: bugfix + translating tests from cpp unit tests (#6559)
This PR fixes an issue in the python API for datatypes, and also introduces tests translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/datatype_api_black.cpp

The next PR will translate more tests and will also introduce missing functions in the python API for datatypes.
2021-05-28 20:28:56 +00:00
yoni206
91e41bcb66 Move and enhance python API grammar tests (#6538)
The existing test for python API grammar is moved to the right location, `yapf`ed, and changed according to the new style of python API tests. Additionally, minor changes are introduced in order to be an exact translation of https://github.com/cvc5/cvc5/blob/master/test/unit/api/grammar_black.cpp
2021-05-17 11:00:41 -07:00
makaimann
50ff9213e6 Fix for toPythonObj of integer value with real sort (#6505) 2021-05-07 11:01:16 -07:00
yoni206
0daac05ab7 Python API tests for terms -- Part 1 (#6468)
This PR removes the old python api tests for terms from test/api/python/test_term.py and replaces it with a new test file test/python/unit/api/test_term.py. The new test file is obtained by translating test/unit/api/term_black.cpp.

In this PR I only include the tests that pass without requiring any change to the python API. The next PR will add functions to the python API that are currently not supported, along with corresponding tests.

Comment: This was originally done in #6460 on the wrong fork. Now it is re-opened, and addresses all comments given there.
2021-05-03 08:35:47 +02:00
Mathias Preiner
ae5ee4b07d Goodbye CVC4, hello cvc5! (#6371)
This commits changes the build system to cvc5 and removes the remaining
occurrences of CVC4. It further cleans up outdated/unused scripts in contrib/.
2021-04-21 10:21:34 -07:00
yoni206
d6a50e3ebe python API sorts: adding functions and tests (#6361)
This PR does the following:

1. removes old python sort API test
2. creates a new python sort API test, obtained by translating the (entire) cpp unit test https://github.com/CVC4/CVC4/blob/master/test/unit/api/sort_black.cpp
3. adds support for bags and datatype selectors/testers domain/codomain in the python API.
2021-04-20 14:33:10 +00:00
Aina Niemetz
7ec3005875 Refactor and update copyright headers. (#6316) 2021-04-12 19:31:43 +00:00
Aina Niemetz
b302cb1f92 Update copyright headers to 2021. (#6081) 2021-03-09 07:27:03 +00:00
Aina Niemetz
92e9feab5f Update copyright headers. 2020-12-02 19:55:00 -08:00
makaimann
116114d927 Run python tests during make check (#5226)
If building with python bindings, check the pytest is installed, and adds a command to run pytest after the existing make check tests. If built without python bindings, it just uses a null command. Note: the current semantics are such that the pytest tests will not run if the ctest run fails (unless you pass the correct flag to make to continue --ignore-errors I believe). I can look into changing this semantics if that would be preferred.
2020-11-02 16:17:21 -08:00