Matyáš Kříž
312257727f
Add support for importing individual types.
2019-01-24 11:09:03 +01:00
Matyáš Kříž
233a04fda5
Add `debugMode` capability to `Tokenizer` to output less information in debug mode.
2019-01-24 11:08:16 +01:00
Matyáš Kříž
f9f947fc5b
Ignore classes marked as `final`.
2019-01-24 11:08:16 +01:00
Matyáš Kříž
aa0b7ec77a
Use older string subscripting to compile on Xcode 9.
2019-01-24 11:08:16 +01:00
Matyáš Kříž
04c9db0400
Generate attributes for methods and variables.
2019-01-24 11:08:16 +01:00
Matyáš Kříž
5867e24421
Add basic attribute generation.
2019-01-24 11:07:08 +01:00
Matyáš Kříž
1b77516e83
Generate attributes.
2019-01-24 11:07:08 +01:00
Matyáš Kříž
2f6ab41bbc
Add `@available` attribute support.
2019-01-24 11:05:37 +01:00
Matyáš Kříž
2961debaba
Transform IUO return value as well.
2019-01-24 11:04:30 +01:00
Matyáš Kříž
7ad094cf78
Transform IUO into `Optional` to prevent errors.
2019-01-24 11:04:30 +01:00
Matyáš Kříž
9d6ecf889c
Add class accessibility to required places.
2018-11-09 13:36:48 +01:00
Matyáš Kříž
d29ab5f839
Show class accessibility.
2018-11-09 13:36:48 +01:00
Matyáš Kříž
acf338e4a1
Fix two bugs introduced by code cleaning.
2018-11-09 13:36:14 +01:00
Matyáš Kříž
5c3c305216
Coalesce to `false` if there are no attributes.
2018-11-05 17:29:05 +01:00
Matyáš Kříž
b22502a82b
Bring back `fallthrough`.
2018-11-05 16:29:04 +01:00
Matyáš Kříž
c558179b33
Don’t generate comments if not in debug mode.
2018-11-05 16:25:10 +01:00
Matyáš Kříž
231216b588
Code cleaning.
2018-11-05 15:12:00 +01:00
Tadeas Kriz
fa8231105a
Fix escaping closure (crashing in Xcode 10).
2018-10-09 13:52:37 +02:00
Tadeas Kriz
12f9bac435
Fix warnings.
2018-10-09 13:52:23 +02:00
Marek Slavik
0fc242dcec
Make project compilable.
2018-09-27 15:24:52 +02:00
Tadeas Kriz
c6baeda34c
Add first draft of a new Mock initialization DSL.
2018-07-06 15:39:08 +02:00
Tadeas Kriz
59f2240831
Reintroduce support for pre-0.11.0 Cuckoo spies.
2018-06-05 16:35:51 +02:00
Matyáš Kříž
0a5c4f7f1d
Remake `ContainerToken` filtering to be more effective and easier to add more filters in the future. (@TadeasKriz)
2018-04-27 13:55:28 +02:00
Matyáš Kříž
76472af91e
Add regular expression `class` and `protocol` matching.
2018-04-27 13:55:28 +02:00
Matyáš Kříž
3793af312a
Add `glob` switch that parses input paths as globs enabling for easier project scaling.
2018-04-27 13:55:28 +02:00
Matyáš Kříž
682619c35f
Use `Switch` instead of `Option`.
2018-04-06 20:01:30 +02:00
Matyáš Kříž
bee9b97bf0
Add a debug flag that generates general info above methods when used.
2018-04-06 19:38:00 +02:00
Gyuri Grell
ace61bb081
The sort of input files occurred to soon
...
* The files input via options are mapped to Path objects then sorted. This actually happened too soon, since the array is then converted to a Set, then converted back to an Array. The Set conversion changes the order (since it is unordered) and those we lost the effect of the sort. I move the sort to the correct place, which is on the outermost Array so that the inputPathValues array is now correctly sorted.
2018-03-23 18:18:37 +01:00
Gyuri Grell
f5093adcae
Fixes a regression introduced in 96ebbbf
...
* There was an attempt to make the file order deterministic, but the sorting that was added only worked if all mocks were generated in a single file. If generated to a path, which creates a file per mock, the filenames and the file contents did not match. Solution was to sort the set of paths passed in as options instead, moving the sorting a little earlier than before.
2018-02-21 10:08:02 +01:00
Arjan Duijzer
f0f31bd0e9
Adding support for overloaded method names
2017-12-29 10:55:11 +01:00
Tadeas Kriz
0f52ceef7e
Add a few more tests.
2017-11-15 00:16:23 +01:00
Tadeas Kriz
8e49eefd4d
Remove TemplateEncoder and change Spy behavior.
2017-11-14 22:24:18 +01:00
Ian Keen
96ebbbf9ca
Fix nondeterministic handling of input files
2017-11-09 11:23:02 +01:00
Tadeas Kriz
2bf60e5dc1
Double the maximum of parameters for `call` and `callThrows`.
2017-10-17 15:25:11 +02:00
KaosDG
75be1e38d7
Adjusted the logic for determining if a closure is implicitly escaping (optional closure)
...
Adjusted the nested Closure logic so that we can pass whether the parent method `throws`
Adjusted the Mock.swift.stencil to account for the above, and some cleanup
Added a few more test cases in TestedSubclass.swift for closures that throw, etc.
2017-10-02 19:40:03 +02:00
KaosDG
85da0d9fb1
added open/close nested closure filters for the withoutActuallyEscaping(…) portion.
...
cleaned up the mock stencil a little.
added a sample multi-closure method
2017-10-02 19:40:03 +02:00
KaosDG
dec5e08c1e
fixes some deprecation warnings, and another attempt at writing good closures.
2017-10-02 19:40:03 +02:00
KaosDG
4ca15ff61d
working on the generated mocks.
...
Closures are a problem :(
2017-10-02 19:40:03 +02:00
KaosDG
725e30ef3f
Updating Cuckoo for Swift 4.0
...
- Created new swift 4 Package, and updated to latest API.
- Updated package dependencies. Note: FileKit points to /develop branch, this should be updated once a Sweift 4 version is released.
- Required code changes to build in Swift-4.0
2017-10-02 19:40:03 +02:00
Tadeas Kriz
d9b2614d2b
Update template.
2017-04-27 16:26:52 +02:00
Tadeas Kriz
12e8cdcc8b
Fix #118 .
2017-04-27 15:36:26 +02:00
Tadeas Kriz
9c09ea19d8
Fix crash when using non-ASCII characters.
2017-04-27 14:46:58 +02:00
Arjan Duijzer
8d09211853
Add option to exclude classes and/or protocols from mock generation
2017-04-25 23:13:04 +02:00
Arjan Duijzer
e2e7928018
Typo oprional -> optional
2017-04-25 22:46:01 +02:00
Tadeas Kriz
25c061a489
Fix build timeouting.
2017-04-25 18:02:57 +02:00
Tadeas Kriz
2f90d0276a
Add to compilable and green test state.
2017-04-02 18:03:31 +02:00
Tadeas Kriz
b035408a6b
WIP: Add objc support.
2017-02-24 20:07:52 +01:00
Tadeas Kriz
fe13945a78
Remove old generator methods.
2017-02-24 18:37:50 +01:00
Tadeas Kriz
61ab7df415
Fix issues from merge.
2017-02-24 18:08:58 +01:00
Tadeas Kriz
35d18f6eb5
Add stencil templates to replace Generator.
2017-02-24 17:53:17 +01:00
Tadeas Kriz
c24f2edd60
Switch Generator to Swift Package Manager.
2017-02-24 17:52:11 +01:00
Valerij Gerasimenko
78330f15dc
rename manager to cuckoo_manager
2017-02-24 17:49:45 +01:00
Valerij Gerasimenko
ad4cc004db
skip deinit generation. update optional protocol method generation
2017-02-23 23:22:47 +01:00
Louis van der Stam
463ed7a6c1
Generate empty init functions when generating a mock from a protocol.
2017-02-23 15:53:36 +01:00
Arjan Duijzer
7328aedcfd
.flatMap { $0 } hunt
2017-02-23 15:39:53 +01:00
Arjan Duijzer
93a2f7d831
var inheritedTypes: [InheritanceDeclaration] { get }
2017-02-23 15:39:53 +01:00
Arjan Duijzer
4c86636835
Added support for mocking Inherited types
2017-02-23 15:39:53 +01:00
Miguel Bassila
c0063f1a69
Update minAccessibility to return Open when val1 or val2 is Open
2017-02-14 16:35:09 +01:00
Miguel Bassila
c5247dd897
Add Open case to Accessibility enum
2017-02-14 16:35:09 +01:00
Tadeas Kriz
eb569cda77
Bump version and fill changelog.
2017-01-16 17:03:08 +01:00
Louis van der Stam
b0661e94b2
Fixed the access modifier and added a public class with public members…
2017-01-16 16:49:23 +01:00
Louis van der Stam
2875ec43bd
Changed after review.
2017-01-16 15:46:05 +01:00
Louis van der Stam
4448feeebb
Added function with constructed default values. Don’t know how to properly test this.
2017-01-16 15:46:05 +01:00
Louis van der Stam
25a6a217b0
Added some to the tested class and inspected the generated code
2017-01-13 15:48:27 +01:00
Tadeas Kriz
f966c7ac1b
Bump version.
2016-12-20 12:19:16 +01:00
Filip Dolník
0eb274a6d5
Show errors in issue navigator.
2016-12-18 21:43:00 +01:00
Filip Dolník
5094d166d8
Fix support of closures and unwrapped optionals.
2016-12-18 21:31:41 +01:00
Filip Dolník
f3064ae797
Improve error handling.
2016-12-18 21:31:41 +01:00
Tadeas Kriz
4a1dbbd97c
Bump version to 0.8.1.
2016-12-08 15:55:33 +01:00
Tadeas Kriz
dd44ff208b
Update dependencies.
2016-11-09 11:40:20 +01:00
Tadeas Kriz
ed32e76438
Update SourceKitten to point to the tip of master.
2016-10-18 18:10:21 +02:00
Filip Dolník
36dc88e877
Fix PR issues.
2016-09-23 17:47:08 +02:00
Filip Dolník
9290ac51f6
Fix Travis.
2016-09-22 10:01:21 +02:00
Filip Dolník
6d60a13415
Fix that input files cannot be specified directly in Run script in Input Files form.
2016-09-22 10:01:21 +02:00
Filip Dolník
a4dfb0e301
Remove auto generated inits.
2016-09-22 10:01:21 +02:00
Filip Dolník
c4a7e16d69
Add stub objects.
2016-09-22 10:01:21 +02:00
Filip Dolník
b3f6d78c8d
Add support for Swift 3.
2016-09-22 10:00:38 +02:00
Filip Dolník
f684533f03
Convert code to Swift 3.
2016-09-22 10:00:38 +02:00
Tadeas Kriz
2c545b932b
Add generation of no-impl stubs.
2016-09-20 22:45:29 +02:00
Filip Dolník
43cf00b208
Added --no-class-mocking parameter to generator.
2016-09-18 16:07:30 +02:00
Filip Dolník
2ea2325157
Add spy method to Mock protocol.
2016-09-07 14:55:33 +02:00
Filip Dolník
4a2a72fac9
Fix spies.
2016-09-07 14:37:18 +02:00
Filip Dolník
c7dd503669
Fix #54 .
2016-09-07 12:57:45 +02:00
Tadeas Kriz
d8b65f542f
Fix #55 .
2016-08-31 15:54:44 +02:00
Filip Dolník
dde17799c8
Refactoring.
2016-08-26 14:15:56 +02:00
Filip Dolník
aeb465339a
Merge with CuckooGenerator.
2016-08-26 12:14:35 +02:00