Commit Graph

75 Commits

Author SHA1 Message Date
Benjamin Muskalla
abd770a027 Avoid empty template in test generator 2021-09-14 15:32:12 +02:00
Benjamin Muskalla
f9918cc63c Test generator uses InlineFlowTest 2021-09-14 11:58:56 +02:00
Chris Smowton
0dd463dd2b Merge pull request #6520 from smowton/smowton/feature/allow-local-interfaces
Java: Allow local interfaces
2021-09-03 12:01:36 +01:00
Chris Smowton
c259d0204a Move unreachable cases of IndirectType into getAContainedType 2021-09-02 17:53:52 +01:00
Chris Smowton
b9afccc015 Remove impossible lines from Stubs.qll 2021-09-02 17:14:38 +01:00
Chris Smowton
e048a729db Add Interface.isLocal and use it where appropriate
Some EJB logic regrettably needs to be renamed out of the way. Hopefully the churn caused by this is less than would be caused if Interface's isLocal needed to be named differently from Class.isLocal.
2021-09-02 14:51:46 +01:00
Chris Smowton
b38a23daee Fix test cases featuring primitive arrays
Previously we couldn't print the name of types like `byte[]` for example.
2021-08-31 15:12:47 +01:00
Chris Smowton
f94d8c341d Abbreviate multi-column min 2021-08-31 11:57:49 +01:00
Chris Smowton
510f5abb9a Add missing qldoc 2021-08-31 11:56:03 +01:00
Chris Smowton
5dddc48e60 autoformat 2021-08-31 11:53:13 +01:00
Sauyon Lee
adcb90aa8c fixup generateflowtestcase chaneg 2021-08-27 11:25:03 -07:00
Sauyon Lee
23b9028d2c Correctly determine which support method definitions are required 2021-08-27 11:25:03 -07:00
Sauyon Lee
04e04b3031 Use array allocation syntax 2021-08-27 11:25:03 -07:00
Sauyon Lee
97faeb026f Fix side of stack that gen method types are used 2021-08-27 11:25:03 -07:00
Sauyon Lee
119de6c60c Replace type variables before attempting to match to an array generation 2021-08-27 11:25:03 -07:00
Sauyon Lee
9d66761eeb Consider a callable to ambiguous if it has a varargs parameter 2021-08-27 11:25:02 -07:00
Sauyon Lee
0d174f2daf Only include support methods and imports from working test cases 2021-08-27 11:25:02 -07:00
Sauyon Lee
2132ee52d5 Restrict the size of appliesTo for default methods 2021-08-26 08:02:21 -07:00
Sauyon Lee
abf3bbbe8d Add qldoc for public elements 2021-08-26 08:02:21 -07:00
Sauyon Lee
e7611ab641 Move getCall and appliesTo to relevant classes 2021-08-26 08:02:21 -07:00
Sauyon Lee
ce8d14e6ef Add a priority predicate for test generation support methods 2021-08-26 08:02:21 -07:00
Sauyon Lee
1bd5eb5120 Use if statement instead of manual disjuction 2021-08-26 08:02:21 -07:00
Sauyon Lee
73d6177477 Java test gen: make char zero '\0' 2021-08-26 08:02:20 -07:00
Chris Smowton
2b0f6a2723 Java: Generate more realistic tests 2021-08-26 08:02:20 -07:00
Chris Smowton
33c727e6b9 Split up GenerateFlowTestCase.qll
This doesn't change any behaviour or alter any predicate bodies
2021-08-26 08:02:19 -07:00
Tony Torralba
1ee2f6f207 Adapt test generator to new package name 2021-08-23 16:05:13 +02:00
Chris Smowton
7a2704373f Merge pull request #5943 from joefarebrother/java-stub
[Java] Add stubbing script
2021-08-11 16:11:53 +01:00
Joe Farebrother
7462180dcd Improve handling or array types 2021-08-10 16:52:38 +01:00
Joe Farebrother
a4659f4e96 Exclude package protected members 2021-08-03 10:51:39 +01:00
Joe Farebrother
3b430d4925 Use getComponentType 2021-07-29 10:11:22 +01:00
Joe Farebrother
f7099f459f Java: Test generator: use getComponentType 2021-07-29 10:08:45 +01:00
Joe Farebrother
d900fcaf42 Merge pull request #6374 from joefarebrother/test-gen-improvements
Java: Add support for synthetic fields to the test generator
2021-07-28 16:02:47 +01:00
Joe Farebrother
9ddae3e9f6 Fix spelling
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
2021-07-28 10:12:17 +01:00
Joe Farebrother
2d862ef119 Support synthetic fields 2021-07-27 17:28:53 +01:00
Joe Farebrother
a8cca4ba0e Merge pull request #6373 from joefarebrother/test-gen-improvements
Java: Test generator improvements
2021-07-27 15:44:56 +01:00
Joe Farebrother
309f0e7c26 Fix handling of arrays 2021-07-27 15:05:57 +01:00
Joe Farebrother
9ffcfbcd33 Add --force option 2021-07-27 15:05:57 +01:00
Joe Farebrother
8ab0fd54b4 Improvements to the test generator:
- Only reference public methods
- Report rows for which test cases could not be generated
- Add a blanket `throws Exception` clause to the generated method
2021-07-27 15:05:55 +01:00
Joe Farebrother
2036aa1e4a Format test generator 2021-07-27 15:04:19 +01:00
Chris Smowton
97d603cafb Add test-case generator check for non-parseable rows 2021-07-27 14:26:22 +01:00
Joe Farebrother
358a7c1707 Fix issue when building with no pom file 2021-07-26 10:38:16 +01:00
Joe Farebrother
6be9c705f0 Update usage text 2021-07-22 16:30:26 +01:00
Sauyon Lee
150f3fd352 improve windows compatibility 2021-07-22 08:00:14 -07:00
Sauyon Lee
5d716b95b1 Allow use of pom.xml to generate stubs 2021-07-22 07:52:35 -07:00
Joe Farebrother
af78b99475 Include stubs for javax 2021-07-15 10:58:12 +01:00
Joe Farebrother
f59ab527b4 Fix issue with nested types 2021-07-15 10:57:32 +01:00
Joe Farebrother
65ce8aa798 Fix issue with circular type bounds 2021-07-15 10:49:14 +01:00
Joe Farebrother
0577e12b97 Add consistency checks 2021-07-15 10:49:13 +01:00
Joe Farebrother
ecf130f7ae Move stubber to utils folder for consistency with test generator 2021-07-15 10:49:13 +01:00
Chris Smowton
e9390cb3eb Remove superfluous conjunct 2021-07-14 12:42:28 +01:00