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
Chris Smowton
1044049e72
Simplify getInput
2021-07-13 16:36:26 +01:00
Chris Smowton
98b85a481c
Improve inline-expectation style
2021-07-13 16:36:08 +01:00
Chris Smowton
a11021991a
Improve method documentation
2021-07-13 16:35:44 +01:00
Chris Smowton
b5492056d8
Remove superfluous parens
2021-07-13 16:35:22 +01:00
Chris Smowton
97694bc9a1
Report error even if interpretElement resolves to a non-Callable Element
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2021-07-13 16:16:01 +01:00
Chris Smowton
47ccb19b84
SSV -> CSV everywhere
...
While these are semicolon-delimited, we use CSV as a generic term for delimited values
2021-06-29 15:59:43 +01:00
Chris Smowton
cf7c966ea7
GenerateFlowTestCase: make imports private
2021-06-29 15:59:43 +01:00
Chris Smowton
5a71812001
Adjust import
...
Type Content has moved into DataFlowUtil
2021-06-29 15:59:43 +01:00
Chris Smowton
95b640db20
Resolve missing qldoc errors
...
Document some, make some private, and delete the needless modules surrounding the spring models.
2021-06-29 15:59:43 +01:00
Chris Smowton
eda7bb6aa2
Fix: restrict generated test cases to requested rows
2021-06-29 15:59:14 +01:00
Chris Smowton
bd1bd8cf08
Switch to an abstract unit / predicate approach to specifying rows to generate tests for
...
This enables moving this code into the qll file, rather than having to specify a query predicate in the .ql
2021-06-29 15:59:14 +01:00
Chris Smowton
f3868887b8
Test case generator: rework to use a less-invasive ExternalFlow API
...
Some predicate/type names and docs are also improved
2021-06-29 15:59:14 +01:00
Chris Smowton
59725d635b
Test case generator: improve error reporting
...
We now distinguish cases where SSV rows are not in scope at all from those where they don't identify a known type or method, or where input or output specs could not be parsed.
2021-06-29 15:59:14 +01:00
Chris Smowton
dff9c717bc
Fix test case generation when no auxiliary support functions are required
2021-06-29 15:59:14 +01:00
Chris Smowton
b1af90991d
Add help text to GenerateFlowTestCase.py
2021-06-29 15:59:14 +01:00
Chris Smowton
5f1a491516
Fix test-generation when a type variable's bound is itself a type variable
...
For example, class G<A, B extends A>
2021-06-29 15:59:14 +01:00
Chris Smowton
e542e71cf5
Fix testing methods with 2-qualifier or deeper input specifications
...
For example, an identity function on lists-of-maps, which might convey MapValue of Element of Argument[0] to MapValue of Element of ReturnValue, requiring `newWithElement(newWithMapValue(source())` on the input side but `getMapValue(getElement(out))` on the output side.
2021-06-29 15:59:13 +01:00
Chris Smowton
0d8124bc95
Document test generator
2021-06-29 15:59:13 +01:00
Chris Smowton
617201930d
Always use source declarations (i.e, raw types) when naming types in tests
2021-06-29 15:59:13 +01:00
Chris Smowton
e8acfec070
Fix formatting of instance variables
2021-06-29 15:59:13 +01:00
Chris Smowton
e2cfc17bfe
Fix output of nested and generic type names, and disambiguate overloads where necessary
2021-06-29 15:59:11 +01:00
Chris Smowton
6d9661f412
Fix open-for-writing statement
2021-06-29 15:58:39 +01:00
Chris Smowton
d6edfd50da
Determine when a model row didn't produce any tests; fix the model specifications revealed defective by this feature.
2021-06-29 15:55:34 +01:00
Chris Smowton
6360e0b7c4
Add flow-through test case generator
2021-06-29 15:55:13 +01:00
Chris Smowton
6fee40cfde
Add flow-through test case generator
2021-06-29 15:55:13 +01:00