Commit Graph

43 Commits

Author SHA1 Message Date
Michael Tautschnig 46f7987359 Fix perl regular expressioons in regression test descriptions
Parentheses need to be escaped, and || as well as && are interpreted by perl as
or/and (and thus need escaping as well).
2018-05-17 17:35:21 +01:00
Michael Tautschnig 3321735dc7 Move implementation of failed-tests-printer.pl into test.pl
Added a new option "-p" to test.pl to request printing failure logs instead of
doing so via an external script. This simplifies various Makefiles and enables
use in cmake builds.
2017-11-02 12:18:15 +00:00
Norbert Manthey 751208d28e tests: drop number of iterations
When checking for success or failure of a test, the number of iterations
in the actual test should be irrelevant. As MiniSAT and PicoSAT seem to
disagree on this number, do not check for it, so that the testis pass
again.
2017-10-27 21:19:08 +02:00
Daniel Kroening 320eeaf3e9 use jbmc in regression tests 2017-10-18 14:15:00 +01:00
Romain Brenguier c24e6c93b2 Update regression test that can randomly fail
This test could randomly fail, it was simplified and the previous
version is marked as knownbug.
The problem should be corrected by PR 1420
2017-09-29 12:33:27 +01:00
Romain Brenguier 52a08d8c34 Setting string-max-length on strings test
The solver can run out of memory in an unpredictable way when string
max length is not set.
2017-09-29 12:32:52 +01:00
reuk 413fc1b53e Automatically deduce test names from dir names 2017-09-20 14:36:59 +01:00
reuk f6e49683c9 Enable running tests from CMake 2017-09-11 14:29:12 +01:00
Romain Brenguier 9a8c063036 Setting string-max-length for several tests
Cbmc can potentialy run out of memory if no maximum string length is
set. This happens more often with the new version of check axioms
because a concretization step is made to be more precise in the check.
2017-08-29 10:28:04 +01:00
Chris Smowton 4fc60e716b Disable default pointer check (replaced by java_bytecode_instrument)
Also amend tests that are perturbed by this.

They used to require a specific goal marked as success, but when they become
simple enough that the simplifier solves the problem by itself the goal list is
not printed. Therefore just look for VERIFICATION SUCCESSFUL.

Also modify a test that was looking for a null pointer failure, since the
phrasing of them has changed.
2017-08-10 17:45:05 +01:00
Romain Brenguier 4928ef657a Regression tests for Character.getNumericValue
This used to make CBMC crash but is now evaluated correctly.
2017-08-02 10:55:04 +01:00
Lukasz A.J. Wrona b295c05486 Enable working string regression tests 2017-07-26 21:57:56 +01:00
Lukasz A.J. Wrona 5e02b0cadb Disable bug-test-gen-095 string refinement test 2017-07-24 15:11:42 +01:00
Lukasz A.J. Wrona 40ac691045 Fix a "bug-test-gen-095" test description 2017-07-11 10:44:43 +01:00
Lukasz A.J. Wrona 1563e30e08 Enable strings test suite
- Enables regression/strings test suite
 - Updates the regression/strings Makefile to the latest version
2017-07-11 10:38:23 +01:00
Jesse Sigal 939fb87662 Added regression tests based on originating test-gen tests
The relevant tests implemented in diffblue/test-gen/pull/479 (StringContains3 and StringContains4) for test-gen have been adapted and added as StringContains01 and StringContains02 resp. They have been marked as future in accordance to the standard for other tests. A contains smoke test already exists and is active, which was extended.
2017-07-05 09:51:13 +01:00
Romain Brenguier 86de08fbc0 Update strings-smoke-test
Script to gather performances on string tests
Draw graphs in a png file.
The file name contains the date and commit.
2017-06-05 14:29:19 +01:00
Romain Brenguier aaa56bb212 Adding tests for issue diffblue/test-gen#119 2017-04-11 16:27:24 +01:00
Joel Allred c7691a4ffd Restructuration of tests on strings
Add test java_intern
Adapt test.desc to new output format
Make more robust java tests.
Add test for parseint.

Correction in the hacks to use refined strings in C programs

Add smoke tests for java string support
Quick set of tests.
Created by modifying the existing development tests.
Longer tests are run when using 'make testall'.
Format of java files was adapted.
No change to the validation tests (written by Lucas Cordeiro).

Update smoke tests

Add a series of performance tests that check that the negation of the
assertions found in the smoke tests indeed fail.

Update java_char_array_init/test_init.class

Add first fixed_bugs test
For bug #95

Update test description with new option name
String refinement option name has changed to --refine-strings

Formatting in cprover-string-hack.h

Move smoke tests to regression folder.

Move fixed bugs tests to strings folder

Move string perfomance tests to strings directory

These are not really performance tests, only tests that are longer than
the smoke tests.

Adapt Makefile for new location of smoke tests
2017-03-24 11:55:40 +00:00
Lucas Cordeiro 4cb8705b2b set EXIT to 10 to all failing string-solver test cases
set EXIT to 10 in the test description of each string-solver test
case that is supposed to fail
2017-03-15 13:33:43 +00:00
Lucas Cordeiro b1de100f4b added test cases related to validate data from user using the ValidateInput class
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:28:21 +00:00
Lucas Cordeiro 2fcda10414 added test cases related to StringTokenizer object used to tokenize strings
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:27:30 +00:00
Lucas Cordeiro 0f438fa5a1 added test cases related to string class substring methods
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:26:42 +00:00
Lucas Cordeiro fdf2b9f87a added test cases related to string valueOf methods
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:25:48 +00:00
Lucas Cordeiro dfdb5416d3 added test cases related to string startsWith and endsWith
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:24:57 +00:00
Lucas Cordeiro 2ec8fe0f29 added string methods length, position, replace, toUpperCase, toLowerCase, and trim
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:24:07 +00:00
Lucas Cordeiro c94a19350a added string searching methods indexOf and lastIndexOf
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:23:22 +00:00
Lucas Cordeiro 19f44b7f8e added test cases related to string class constructors
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:22:27 +00:00
Lucas Cordeiro 0180ce8ce8 added test cases related to string method concat
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:21:49 +00:00
Lucas Cordeiro bdb9b4e097 added string methods equals, equalsIgnoreCase, compareTo and regionMatches
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:20:06 +00:00
Lucas Cordeiro 7e742bc8ad added stringBuilder methods insert, delete and deleteCharAt
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:19:25 +00:00
Lucas Cordeiro 8ec8477053 added test cases related to stringBuilder constructors
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:18:42 +00:00
Lucas Cordeiro b7636c298b added stringBuilder methods charAt, setCharAt, getChars and reverse
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:17:56 +00:00
Lucas Cordeiro 83eb542aba added stringBuilder methods length, setLength, capacity and ensureCapacity
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:17:03 +00:00
Lucas Cordeiro 756e15ef45 added test cases related to sringBuilder append methods
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:16:01 +00:00
Lucas Cordeiro 2d726bee4e added character static methods for testing characters and converting case
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:14:59 +00:00
Lucas Cordeiro daf40f59cb added test cases related to string methods replaceFirst, replaceAll and split
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:13:08 +00:00
Lucas Cordeiro be02a80607 added test cases related to classes pattern and matcher
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-22 14:09:35 +00:00
thk123 9b052c200f Modified tests to pass without using grep
Now directly test individual lines with perls regex matching rather than
calling out to grep. Some changes were required:

- escape (,  ) if we want to match them
- unescape (, ) if we want to use them as regex bracket groups
- escape +, $ if we want to use them as actual characters
- unescape + to use as a regex +
2017-02-14 17:29:15 +00:00
Romain Brenguier f2c4804fc9 Regression test for the string-refine option
We are going to add a string-refine option to CBMC, (instead a pass
option as used in previous version of the tests).
We changed the test description file accordingly and added a few
extra tests (for java char arrays).

Also changed the flag in string regression from CORE to FUTURE:
Since the string solver is not yet part of this branch, we mark the
tests for string functions as FUTURE. They will be changed to CORE
once the corresponding features are integrated in CBMC.
I also changed the Makefile for being able to test tests marked as
future.
2016-12-27 10:03:05 +00:00
Robert (Jamie) Munro be697376c5 Normalise newlines at ends of files 2016-11-29 09:59:31 +00:00
Robert (Jamie) Munro d53dbf9560 Remove trailing whitespace from all lines 2016-11-29 09:58:36 +00:00
Romain Brenguier e6d97e1a3b Regressions tests for string functions 2016-10-27 10:26:01 +01:00