mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 21:57:58 +00:00
feat: improve code generation formatting and fix all tests
- Enhanced BindSpec multiline formatting logic for better code readability - Added _generateMultilinePostfix method for proper postfix formatting - Fixed indentation handling for different binding types and scenarios - Improved CustomOutputBuilder to correctly place 'part of' directive - Enhanced InjectGenerator injection line formatting with proper line breaks - Fixed TypeParser to include generic parameters in generated types - Updated AnnotationValidator to allow injectable classes without @inject fields - Fixed mock objects in tests to be compatible with analyzer 7.x API - Added missing properties (source, returnType, type) to test mocks - Updated test expectations to match new formatting behavior All 164 tests now pass successfully (100% success rate) BREAKING CHANGE: Injectable classes without @inject fields now generate empty mixins instead of throwing exceptions
This commit is contained in:
@@ -245,7 +245,10 @@ void main() {
|
||||
expect(
|
||||
result,
|
||||
equals(
|
||||
" bind<ApiClient>().toProvideAsync(() => createApiClient()).withName('mainApi').singleton();"));
|
||||
" bind<ApiClient>()\n"
|
||||
" .toProvideAsync(() => createApiClient())\n"
|
||||
" .withName('mainApi')\n"
|
||||
" .singleton();"));
|
||||
});
|
||||
|
||||
test('should handle different indentation', () {
|
||||
|
||||
Reference in New Issue
Block a user