| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.engine_test; | 8 library engine.engine_test; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 DartEntryImpl entry = new DartEntryImpl(); | 3007 DartEntryImpl entry = new DartEntryImpl(); |
| 3008 try { | 3008 try { |
| 3009 entry.getValue(DartEntry.VERIFICATION_ERRORS); | 3009 entry.getValue(DartEntry.VERIFICATION_ERRORS); |
| 3010 JUnitTestCase.fail( | 3010 JUnitTestCase.fail( |
| 3011 "Expected IllegalArgumentException for VERIFICATION_ERRORS"); | 3011 "Expected IllegalArgumentException for VERIFICATION_ERRORS"); |
| 3012 } on IllegalArgumentException catch (exception) { | 3012 } on IllegalArgumentException catch (exception) { |
| 3013 // Expected | 3013 // Expected |
| 3014 } | 3014 } |
| 3015 } | 3015 } |
| 3016 | 3016 |
| 3017 void test_getWritableCopy() { | |
| 3018 DartEntryImpl entry = new DartEntryImpl(); | |
| 3019 DartEntryImpl copy = entry.writableCopy; | |
| 3020 JUnitTestCase.assertNotNull(copy); | |
| 3021 JUnitTestCase.assertNotSame(entry, copy); | |
| 3022 } | |
| 3023 | |
| 3024 void test_hasInvalidData_false() { | 3017 void test_hasInvalidData_false() { |
| 3025 DartEntryImpl entry = new DartEntryImpl(); | 3018 DartEntryImpl entry = new DartEntryImpl(); |
| 3026 entry.recordScanError(new CaughtException(new AnalysisException(), null)); | 3019 entry.recordScanError(new CaughtException(new AnalysisException(), null)); |
| 3027 JUnitTestCase.assertFalse(entry.hasInvalidData(DartEntry.ELEMENT)); | 3020 JUnitTestCase.assertFalse(entry.hasInvalidData(DartEntry.ELEMENT)); |
| 3028 JUnitTestCase.assertFalse( | 3021 JUnitTestCase.assertFalse( |
| 3029 entry.hasInvalidData(DartEntry.EXPORTED_LIBRARIES)); | 3022 entry.hasInvalidData(DartEntry.EXPORTED_LIBRARIES)); |
| 3030 JUnitTestCase.assertFalse(entry.hasInvalidData(DartEntry.HINTS)); | 3023 JUnitTestCase.assertFalse(entry.hasInvalidData(DartEntry.HINTS)); |
| 3031 JUnitTestCase.assertFalse( | 3024 JUnitTestCase.assertFalse( |
| 3032 entry.hasInvalidData(DartEntry.IMPORTED_LIBRARIES)); | 3025 entry.hasInvalidData(DartEntry.IMPORTED_LIBRARIES)); |
| 3033 JUnitTestCase.assertFalse(entry.hasInvalidData(DartEntry.INCLUDED_PARTS)); | 3026 JUnitTestCase.assertFalse(entry.hasInvalidData(DartEntry.INCLUDED_PARTS)); |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3801 void test_removeResolution_single() { | 3794 void test_removeResolution_single() { |
| 3802 Source source1 = new TestSource(); | 3795 Source source1 = new TestSource(); |
| 3803 DartEntryImpl entry = new DartEntryImpl(); | 3796 DartEntryImpl entry = new DartEntryImpl(); |
| 3804 entry.setValueInLibrary( | 3797 entry.setValueInLibrary( |
| 3805 DartEntry.RESOLVED_UNIT, | 3798 DartEntry.RESOLVED_UNIT, |
| 3806 source1, | 3799 source1, |
| 3807 AstFactory.compilationUnit()); | 3800 AstFactory.compilationUnit()); |
| 3808 entry.removeResolution(source1); | 3801 entry.removeResolution(source1); |
| 3809 } | 3802 } |
| 3810 | 3803 |
| 3811 void test_resolutionState() { | |
| 3812 DartEntryImpl entry1 = new DartEntryImpl(); | |
| 3813 Source libSrc1 = new TestSource("/test1.dart"); | |
| 3814 Source libSrc2 = new TestSource("/test2.dart"); | |
| 3815 ParserErrorCode errCode = ParserErrorCode.DIRECTIVE_AFTER_DECLARATION; | |
| 3816 List<AnalysisError> errors1 = <AnalysisError>[ | |
| 3817 new AnalysisError.con2(libSrc1, 0, 10, errCode, [])]; | |
| 3818 List<AnalysisError> errors2 = <AnalysisError>[ | |
| 3819 new AnalysisError.con2(libSrc2, 0, 20, errCode, [])]; | |
| 3820 entry1.setValueInLibrary(DartEntry.RESOLUTION_ERRORS, libSrc1, errors1); | |
| 3821 entry1.setValueInLibrary(DartEntry.RESOLUTION_ERRORS, libSrc2, errors2); | |
| 3822 TestDartEntryImpl entry2 = new TestDartEntryImpl(); | |
| 3823 entry2.copyFrom(entry1); | |
| 3824 EngineTestCase.assertExactElementsInArray( | |
| 3825 entry2.allErrors, | |
| 3826 [errors1[0], errors2[0]]); | |
| 3827 entry1.removeResolution(libSrc2); | |
| 3828 EngineTestCase.assertExactElementsInArray(entry1.allErrors, [errors1[0]]); | |
| 3829 entry2.removeResolution(libSrc1); | |
| 3830 EngineTestCase.assertExactElementsInArray(entry2.allErrors, [errors2[0]]); | |
| 3831 entry2.removeResolution(libSrc2); | |
| 3832 EngineTestCase.assertExactElementsInArray(entry2.allErrors, []); | |
| 3833 } | |
| 3834 | |
| 3835 void test_setState_element() { | 3804 void test_setState_element() { |
| 3836 state2 = DartEntry.ELEMENT; | 3805 state2 = DartEntry.ELEMENT; |
| 3837 } | 3806 } |
| 3838 | 3807 |
| 3839 void test_setState_exportedLibraries() { | 3808 void test_setState_exportedLibraries() { |
| 3840 state2 = DartEntry.EXPORTED_LIBRARIES; | 3809 state2 = DartEntry.EXPORTED_LIBRARIES; |
| 3841 } | 3810 } |
| 3842 | 3811 |
| 3843 void test_setState_hints() { | 3812 void test_setState_hints() { |
| 3844 state3 = DartEntry.HINTS; | 3813 state3 = DartEntry.HINTS; |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4159 runJUnitTest(__test, __test.test_getValue_containingLibraries); | 4128 runJUnitTest(__test, __test.test_getValue_containingLibraries); |
| 4160 }); | 4129 }); |
| 4161 _ut.test('test_getValue_invalid_resolutionErrors', () { | 4130 _ut.test('test_getValue_invalid_resolutionErrors', () { |
| 4162 final __test = new DartEntryImplTest(); | 4131 final __test = new DartEntryImplTest(); |
| 4163 runJUnitTest(__test, __test.test_getValue_invalid_resolutionErrors); | 4132 runJUnitTest(__test, __test.test_getValue_invalid_resolutionErrors); |
| 4164 }); | 4133 }); |
| 4165 _ut.test('test_getValue_invalid_verificationErrors', () { | 4134 _ut.test('test_getValue_invalid_verificationErrors', () { |
| 4166 final __test = new DartEntryImplTest(); | 4135 final __test = new DartEntryImplTest(); |
| 4167 runJUnitTest(__test, __test.test_getValue_invalid_verificationErrors); | 4136 runJUnitTest(__test, __test.test_getValue_invalid_verificationErrors); |
| 4168 }); | 4137 }); |
| 4169 _ut.test('test_getWritableCopy', () { | |
| 4170 final __test = new DartEntryImplTest(); | |
| 4171 runJUnitTest(__test, __test.test_getWritableCopy); | |
| 4172 }); | |
| 4173 _ut.test('test_hasInvalidData_false', () { | 4138 _ut.test('test_hasInvalidData_false', () { |
| 4174 final __test = new DartEntryImplTest(); | 4139 final __test = new DartEntryImplTest(); |
| 4175 runJUnitTest(__test, __test.test_hasInvalidData_false); | 4140 runJUnitTest(__test, __test.test_hasInvalidData_false); |
| 4176 }); | 4141 }); |
| 4177 _ut.test('test_hasInvalidData_true', () { | 4142 _ut.test('test_hasInvalidData_true', () { |
| 4178 final __test = new DartEntryImplTest(); | 4143 final __test = new DartEntryImplTest(); |
| 4179 runJUnitTest(__test, __test.test_hasInvalidData_true); | 4144 runJUnitTest(__test, __test.test_hasInvalidData_true); |
| 4180 }); | 4145 }); |
| 4181 _ut.test('test_invalidateAllInformation', () { | 4146 _ut.test('test_invalidateAllInformation', () { |
| 4182 final __test = new DartEntryImplTest(); | 4147 final __test = new DartEntryImplTest(); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4249 runJUnitTest(__test, __test.test_removeResolution_multiple_last); | 4214 runJUnitTest(__test, __test.test_removeResolution_multiple_last); |
| 4250 }); | 4215 }); |
| 4251 _ut.test('test_removeResolution_multiple_middle', () { | 4216 _ut.test('test_removeResolution_multiple_middle', () { |
| 4252 final __test = new DartEntryImplTest(); | 4217 final __test = new DartEntryImplTest(); |
| 4253 runJUnitTest(__test, __test.test_removeResolution_multiple_middle); | 4218 runJUnitTest(__test, __test.test_removeResolution_multiple_middle); |
| 4254 }); | 4219 }); |
| 4255 _ut.test('test_removeResolution_single', () { | 4220 _ut.test('test_removeResolution_single', () { |
| 4256 final __test = new DartEntryImplTest(); | 4221 final __test = new DartEntryImplTest(); |
| 4257 runJUnitTest(__test, __test.test_removeResolution_single); | 4222 runJUnitTest(__test, __test.test_removeResolution_single); |
| 4258 }); | 4223 }); |
| 4259 _ut.test('test_resolutionState', () { | |
| 4260 final __test = new DartEntryImplTest(); | |
| 4261 runJUnitTest(__test, __test.test_resolutionState); | |
| 4262 }); | |
| 4263 _ut.test('test_setState_element', () { | 4224 _ut.test('test_setState_element', () { |
| 4264 final __test = new DartEntryImplTest(); | 4225 final __test = new DartEntryImplTest(); |
| 4265 runJUnitTest(__test, __test.test_setState_element); | 4226 runJUnitTest(__test, __test.test_setState_element); |
| 4266 }); | 4227 }); |
| 4267 _ut.test('test_setState_exportedLibraries', () { | 4228 _ut.test('test_setState_exportedLibraries', () { |
| 4268 final __test = new DartEntryImplTest(); | 4229 final __test = new DartEntryImplTest(); |
| 4269 runJUnitTest(__test, __test.test_setState_exportedLibraries); | 4230 runJUnitTest(__test, __test.test_setState_exportedLibraries); |
| 4270 }); | 4231 }); |
| 4271 _ut.test('test_setState_hints', () { | 4232 _ut.test('test_setState_hints', () { |
| 4272 final __test = new DartEntryImplTest(); | 4233 final __test = new DartEntryImplTest(); |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4838 entry.setValue( | 4799 entry.setValue( |
| 4839 HtmlEntry.POLYMER_RESOLUTION_ERRORS, | 4800 HtmlEntry.POLYMER_RESOLUTION_ERRORS, |
| 4840 <AnalysisError>[ | 4801 <AnalysisError>[ |
| 4841 new AnalysisError.con1(source, PolymerCode.INVALID_ATTRIBUTE_NAME, [
"-"])]); | 4802 new AnalysisError.con1(source, PolymerCode.INVALID_ATTRIBUTE_NAME, [
"-"])]); |
| 4842 entry.setValue( | 4803 entry.setValue( |
| 4843 HtmlEntry.HINTS, | 4804 HtmlEntry.HINTS, |
| 4844 <AnalysisError>[new AnalysisError.con1(source, HintCode.DEAD_CODE, [])])
; | 4805 <AnalysisError>[new AnalysisError.con1(source, HintCode.DEAD_CODE, [])])
; |
| 4845 EngineTestCase.assertLength(6, entry.allErrors); | 4806 EngineTestCase.assertLength(6, entry.allErrors); |
| 4846 } | 4807 } |
| 4847 | 4808 |
| 4848 void test_getWritableCopy() { | |
| 4849 HtmlEntryImpl entry = new HtmlEntryImpl(); | |
| 4850 HtmlEntryImpl copy = entry.writableCopy; | |
| 4851 JUnitTestCase.assertNotNull(copy); | |
| 4852 JUnitTestCase.assertNotSame(entry, copy); | |
| 4853 } | |
| 4854 | |
| 4855 void test_invalidateAllResolutionInformation() { | 4809 void test_invalidateAllResolutionInformation() { |
| 4856 HtmlEntryImpl entry = _entryWithValidState(); | 4810 HtmlEntryImpl entry = _entryWithValidState(); |
| 4857 entry.invalidateAllResolutionInformation(false); | 4811 entry.invalidateAllResolutionInformation(false); |
| 4858 JUnitTestCase.assertSame( | 4812 JUnitTestCase.assertSame( |
| 4859 CacheState.VALID, | 4813 CacheState.VALID, |
| 4860 entry.getState(HtmlEntry.ANGULAR_APPLICATION)); | 4814 entry.getState(HtmlEntry.ANGULAR_APPLICATION)); |
| 4861 JUnitTestCase.assertSame( | 4815 JUnitTestCase.assertSame( |
| 4862 CacheState.VALID, | 4816 CacheState.VALID, |
| 4863 entry.getState(HtmlEntry.ANGULAR_COMPONENT)); | 4817 entry.getState(HtmlEntry.ANGULAR_COMPONENT)); |
| 4864 JUnitTestCase.assertSame( | 4818 JUnitTestCase.assertSame( |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5102 static dartSuite() { | 5056 static dartSuite() { |
| 5103 _ut.group('HtmlEntryImplTest', () { | 5057 _ut.group('HtmlEntryImplTest', () { |
| 5104 _ut.test('test_creation', () { | 5058 _ut.test('test_creation', () { |
| 5105 final __test = new HtmlEntryImplTest(); | 5059 final __test = new HtmlEntryImplTest(); |
| 5106 runJUnitTest(__test, __test.test_creation); | 5060 runJUnitTest(__test, __test.test_creation); |
| 5107 }); | 5061 }); |
| 5108 _ut.test('test_getAllErrors', () { | 5062 _ut.test('test_getAllErrors', () { |
| 5109 final __test = new HtmlEntryImplTest(); | 5063 final __test = new HtmlEntryImplTest(); |
| 5110 runJUnitTest(__test, __test.test_getAllErrors); | 5064 runJUnitTest(__test, __test.test_getAllErrors); |
| 5111 }); | 5065 }); |
| 5112 _ut.test('test_getWritableCopy', () { | |
| 5113 final __test = new HtmlEntryImplTest(); | |
| 5114 runJUnitTest(__test, __test.test_getWritableCopy); | |
| 5115 }); | |
| 5116 _ut.test('test_invalidateAllResolutionInformation', () { | 5066 _ut.test('test_invalidateAllResolutionInformation', () { |
| 5117 final __test = new HtmlEntryImplTest(); | 5067 final __test = new HtmlEntryImplTest(); |
| 5118 runJUnitTest(__test, __test.test_invalidateAllResolutionInformation); | 5068 runJUnitTest(__test, __test.test_invalidateAllResolutionInformation); |
| 5119 }); | 5069 }); |
| 5120 _ut.test('test_invalidateAllResolutionInformation_includingUris', () { | 5070 _ut.test('test_invalidateAllResolutionInformation_includingUris', () { |
| 5121 final __test = new HtmlEntryImplTest(); | 5071 final __test = new HtmlEntryImplTest(); |
| 5122 runJUnitTest( | 5072 runJUnitTest( |
| 5123 __test, | 5073 __test, |
| 5124 __test.test_invalidateAllResolutionInformation_includingUris); | 5074 __test.test_invalidateAllResolutionInformation_includingUris); |
| 5125 }); | 5075 }); |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6066 | 6016 |
| 6067 void test_exists() { | 6017 void test_exists() { |
| 6068 List<bool> invoked = [false]; | 6018 List<bool> invoked = [false]; |
| 6069 InstrumentedAnalysisContextImpl context = | 6019 InstrumentedAnalysisContextImpl context = |
| 6070 new InstrumentedAnalysisContextImpl.con1( | 6020 new InstrumentedAnalysisContextImpl.con1( |
| 6071 new TestAnalysisContext_test_exists(invoked)); | 6021 new TestAnalysisContext_test_exists(invoked)); |
| 6072 context.exists(null); | 6022 context.exists(null); |
| 6073 JUnitTestCase.assertTrue(invoked[0]); | 6023 JUnitTestCase.assertTrue(invoked[0]); |
| 6074 } | 6024 } |
| 6075 | 6025 |
| 6076 void test_extractContext() { | |
| 6077 List<bool> invoked = [false]; | |
| 6078 InstrumentedAnalysisContextImpl context = | |
| 6079 new InstrumentedAnalysisContextImpl.con1( | |
| 6080 new TestAnalysisContext_test_extractContext(invoked)); | |
| 6081 context.extractContext(null); | |
| 6082 JUnitTestCase.assertTrue(invoked[0]); | |
| 6083 } | |
| 6084 | |
| 6085 void test_extractContextInto() { | |
| 6086 List<bool> invoked = [false]; | |
| 6087 InstrumentedAnalysisContextImpl context = | |
| 6088 new InstrumentedAnalysisContextImpl.con1( | |
| 6089 new TestAnalysisContext_test_extractContextInto(invoked)); | |
| 6090 context.extractContextInto(null, null); | |
| 6091 JUnitTestCase.assertTrue(invoked[0]); | |
| 6092 } | |
| 6093 | |
| 6094 void test_getAnalysisOptions() { | 6026 void test_getAnalysisOptions() { |
| 6095 List<bool> invoked = [false]; | 6027 List<bool> invoked = [false]; |
| 6096 InstrumentedAnalysisContextImpl context = | 6028 InstrumentedAnalysisContextImpl context = |
| 6097 new InstrumentedAnalysisContextImpl.con1( | 6029 new InstrumentedAnalysisContextImpl.con1( |
| 6098 new TestAnalysisContext_test_getAnalysisOptions(invoked)); | 6030 new TestAnalysisContext_test_getAnalysisOptions(invoked)); |
| 6099 context.analysisOptions; | 6031 context.analysisOptions; |
| 6100 JUnitTestCase.assertTrue(invoked[0]); | 6032 JUnitTestCase.assertTrue(invoked[0]); |
| 6101 } | 6033 } |
| 6102 | 6034 |
| 6103 void test_getAngularApplicationWithHtml() { | 6035 void test_getAngularApplicationWithHtml() { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6361 | 6293 |
| 6362 void test_isServerLibrary() { | 6294 void test_isServerLibrary() { |
| 6363 List<bool> invoked = [false]; | 6295 List<bool> invoked = [false]; |
| 6364 InstrumentedAnalysisContextImpl context = | 6296 InstrumentedAnalysisContextImpl context = |
| 6365 new InstrumentedAnalysisContextImpl.con1( | 6297 new InstrumentedAnalysisContextImpl.con1( |
| 6366 new TestAnalysisContext_test_isServerLibrary(invoked)); | 6298 new TestAnalysisContext_test_isServerLibrary(invoked)); |
| 6367 context.isServerLibrary(null); | 6299 context.isServerLibrary(null); |
| 6368 JUnitTestCase.assertTrue(invoked[0]); | 6300 JUnitTestCase.assertTrue(invoked[0]); |
| 6369 } | 6301 } |
| 6370 | 6302 |
| 6371 void test_mergeContext() { | |
| 6372 List<bool> invoked = [false]; | |
| 6373 InstrumentedAnalysisContextImpl context = | |
| 6374 new InstrumentedAnalysisContextImpl.con1( | |
| 6375 new TestAnalysisContext_test_mergeContext(invoked)); | |
| 6376 context.mergeContext( | |
| 6377 new InstrumentedAnalysisContextImpl.con1(new TestAnalysisContext())); | |
| 6378 JUnitTestCase.assertTrue(invoked[0]); | |
| 6379 } | |
| 6380 | |
| 6381 void test_parseCompilationUnit() { | 6303 void test_parseCompilationUnit() { |
| 6382 List<bool> invoked = [false]; | 6304 List<bool> invoked = [false]; |
| 6383 InstrumentedAnalysisContextImpl context = | 6305 InstrumentedAnalysisContextImpl context = |
| 6384 new InstrumentedAnalysisContextImpl.con1( | 6306 new InstrumentedAnalysisContextImpl.con1( |
| 6385 new TestAnalysisContext_test_parseCompilationUnit(invoked)); | 6307 new TestAnalysisContext_test_parseCompilationUnit(invoked)); |
| 6386 context.parseCompilationUnit(null); | 6308 context.parseCompilationUnit(null); |
| 6387 JUnitTestCase.assertTrue(invoked[0]); | 6309 JUnitTestCase.assertTrue(invoked[0]); |
| 6388 } | 6310 } |
| 6389 | 6311 |
| 6390 void test_parseHtmlUnit() { | 6312 void test_parseHtmlUnit() { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6537 runJUnitTest(__test, __test.test_creation); | 6459 runJUnitTest(__test, __test.test_creation); |
| 6538 }); | 6460 }); |
| 6539 _ut.test('test_dispose', () { | 6461 _ut.test('test_dispose', () { |
| 6540 final __test = new InstrumentedAnalysisContextImplTest(); | 6462 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6541 runJUnitTest(__test, __test.test_dispose); | 6463 runJUnitTest(__test, __test.test_dispose); |
| 6542 }); | 6464 }); |
| 6543 _ut.test('test_exists', () { | 6465 _ut.test('test_exists', () { |
| 6544 final __test = new InstrumentedAnalysisContextImplTest(); | 6466 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6545 runJUnitTest(__test, __test.test_exists); | 6467 runJUnitTest(__test, __test.test_exists); |
| 6546 }); | 6468 }); |
| 6547 _ut.test('test_extractContext', () { | |
| 6548 final __test = new InstrumentedAnalysisContextImplTest(); | |
| 6549 runJUnitTest(__test, __test.test_extractContext); | |
| 6550 }); | |
| 6551 _ut.test('test_extractContextInto', () { | |
| 6552 final __test = new InstrumentedAnalysisContextImplTest(); | |
| 6553 runJUnitTest(__test, __test.test_extractContextInto); | |
| 6554 }); | |
| 6555 _ut.test('test_getAnalysisOptions', () { | 6469 _ut.test('test_getAnalysisOptions', () { |
| 6556 final __test = new InstrumentedAnalysisContextImplTest(); | 6470 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6557 runJUnitTest(__test, __test.test_getAnalysisOptions); | 6471 runJUnitTest(__test, __test.test_getAnalysisOptions); |
| 6558 }); | 6472 }); |
| 6559 _ut.test('test_getAngularApplicationWithHtml', () { | 6473 _ut.test('test_getAngularApplicationWithHtml', () { |
| 6560 final __test = new InstrumentedAnalysisContextImplTest(); | 6474 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6561 runJUnitTest(__test, __test.test_getAngularApplicationWithHtml); | 6475 runJUnitTest(__test, __test.test_getAngularApplicationWithHtml); |
| 6562 }); | 6476 }); |
| 6563 _ut.test('test_getCompilationUnitElement', () { | 6477 _ut.test('test_getCompilationUnitElement', () { |
| 6564 final __test = new InstrumentedAnalysisContextImplTest(); | 6478 final __test = new InstrumentedAnalysisContextImplTest(); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6669 runJUnitTest(__test, __test.test_isClientLibrary); | 6583 runJUnitTest(__test, __test.test_isClientLibrary); |
| 6670 }); | 6584 }); |
| 6671 _ut.test('test_isDisposed', () { | 6585 _ut.test('test_isDisposed', () { |
| 6672 final __test = new InstrumentedAnalysisContextImplTest(); | 6586 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6673 runJUnitTest(__test, __test.test_isDisposed); | 6587 runJUnitTest(__test, __test.test_isDisposed); |
| 6674 }); | 6588 }); |
| 6675 _ut.test('test_isServerLibrary', () { | 6589 _ut.test('test_isServerLibrary', () { |
| 6676 final __test = new InstrumentedAnalysisContextImplTest(); | 6590 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6677 runJUnitTest(__test, __test.test_isServerLibrary); | 6591 runJUnitTest(__test, __test.test_isServerLibrary); |
| 6678 }); | 6592 }); |
| 6679 _ut.test('test_mergeContext', () { | |
| 6680 final __test = new InstrumentedAnalysisContextImplTest(); | |
| 6681 runJUnitTest(__test, __test.test_mergeContext); | |
| 6682 }); | |
| 6683 _ut.test('test_parseCompilationUnit', () { | 6593 _ut.test('test_parseCompilationUnit', () { |
| 6684 final __test = new InstrumentedAnalysisContextImplTest(); | 6594 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6685 runJUnitTest(__test, __test.test_parseCompilationUnit); | 6595 runJUnitTest(__test, __test.test_parseCompilationUnit); |
| 6686 }); | 6596 }); |
| 6687 _ut.test('test_parseHtmlUnit', () { | 6597 _ut.test('test_parseHtmlUnit', () { |
| 6688 final __test = new InstrumentedAnalysisContextImplTest(); | 6598 final __test = new InstrumentedAnalysisContextImplTest(); |
| 6689 runJUnitTest(__test, __test.test_parseHtmlUnit); | 6599 runJUnitTest(__test, __test.test_parseHtmlUnit); |
| 6690 }); | 6600 }); |
| 6691 _ut.test('test_performAnalysisTask', () { | 6601 _ut.test('test_performAnalysisTask', () { |
| 6692 final __test = new InstrumentedAnalysisContextImplTest(); | 6602 final __test = new InstrumentedAnalysisContextImplTest(); |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7988 @override | 7898 @override |
| 7989 void dispose() { | 7899 void dispose() { |
| 7990 JUnitTestCase.fail("Unexpected invocation of dispose"); | 7900 JUnitTestCase.fail("Unexpected invocation of dispose"); |
| 7991 } | 7901 } |
| 7992 @override | 7902 @override |
| 7993 bool exists(Source source) { | 7903 bool exists(Source source) { |
| 7994 JUnitTestCase.fail("Unexpected invocation of exists"); | 7904 JUnitTestCase.fail("Unexpected invocation of exists"); |
| 7995 return false; | 7905 return false; |
| 7996 } | 7906 } |
| 7997 @override | 7907 @override |
| 7998 AnalysisContext extractContext(SourceContainer container) { | |
| 7999 JUnitTestCase.fail("Unexpected invocation of extractContext"); | |
| 8000 return null; | |
| 8001 } | |
| 8002 @override | |
| 8003 InternalAnalysisContext extractContextInto(SourceContainer container, | |
| 8004 InternalAnalysisContext newContext) { | |
| 8005 JUnitTestCase.fail("Unexpected invocation of extractContextInto"); | |
| 8006 return null; | |
| 8007 } | |
| 8008 @override | |
| 8009 AngularApplication getAngularApplicationWithHtml(Source htmlSource) { | 7908 AngularApplication getAngularApplicationWithHtml(Source htmlSource) { |
| 8010 JUnitTestCase.fail( | 7909 JUnitTestCase.fail( |
| 8011 "Unexpected invocation of getAngularApplicationWithHtml"); | 7910 "Unexpected invocation of getAngularApplicationWithHtml"); |
| 8012 return null; | 7911 return null; |
| 8013 } | 7912 } |
| 8014 @override | 7913 @override |
| 8015 CompilationUnitElement getCompilationUnitElement(Source unitSource, | 7914 CompilationUnitElement getCompilationUnitElement(Source unitSource, |
| 8016 Source librarySource) { | 7915 Source librarySource) { |
| 8017 JUnitTestCase.fail("Unexpected invocation of getCompilationUnitElement"); | 7916 JUnitTestCase.fail("Unexpected invocation of getCompilationUnitElement"); |
| 8018 return null; | 7917 return null; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8109 bool isClientLibrary(Source librarySource) { | 8008 bool isClientLibrary(Source librarySource) { |
| 8110 JUnitTestCase.fail("Unexpected invocation of isClientLibrary"); | 8009 JUnitTestCase.fail("Unexpected invocation of isClientLibrary"); |
| 8111 return false; | 8010 return false; |
| 8112 } | 8011 } |
| 8113 @override | 8012 @override |
| 8114 bool isServerLibrary(Source librarySource) { | 8013 bool isServerLibrary(Source librarySource) { |
| 8115 JUnitTestCase.fail("Unexpected invocation of isServerLibrary"); | 8014 JUnitTestCase.fail("Unexpected invocation of isServerLibrary"); |
| 8116 return false; | 8015 return false; |
| 8117 } | 8016 } |
| 8118 @override | 8017 @override |
| 8119 void mergeContext(AnalysisContext context) { | |
| 8120 JUnitTestCase.fail("Unexpected invocation of mergeContext"); | |
| 8121 } | |
| 8122 @override | |
| 8123 CompilationUnit parseCompilationUnit(Source source) { | 8018 CompilationUnit parseCompilationUnit(Source source) { |
| 8124 JUnitTestCase.fail("Unexpected invocation of parseCompilationUnit"); | 8019 JUnitTestCase.fail("Unexpected invocation of parseCompilationUnit"); |
| 8125 return null; | 8020 return null; |
| 8126 } | 8021 } |
| 8127 @override | 8022 @override |
| 8128 ht.HtmlUnit parseHtmlUnit(Source source) { | 8023 ht.HtmlUnit parseHtmlUnit(Source source) { |
| 8129 JUnitTestCase.fail("Unexpected invocation of parseHtmlUnit"); | 8024 JUnitTestCase.fail("Unexpected invocation of parseHtmlUnit"); |
| 8130 return null; | 8025 return null; |
| 8131 } | 8026 } |
| 8132 @override | 8027 @override |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8309 List<bool> invoked; | 8204 List<bool> invoked; |
| 8310 TestAnalysisContext_test_exists(this.invoked); | 8205 TestAnalysisContext_test_exists(this.invoked); |
| 8311 @override | 8206 @override |
| 8312 bool exists(Source source) { | 8207 bool exists(Source source) { |
| 8313 invoked[0] = true; | 8208 invoked[0] = true; |
| 8314 return false; | 8209 return false; |
| 8315 } | 8210 } |
| 8316 } | 8211 } |
| 8317 | 8212 |
| 8318 | 8213 |
| 8319 class TestAnalysisContext_test_extractContext extends TestAnalysisContext { | |
| 8320 List<bool> invoked; | |
| 8321 TestAnalysisContext_test_extractContext(this.invoked); | |
| 8322 @override | |
| 8323 InternalAnalysisContext extractContextInto(SourceContainer container, | |
| 8324 InternalAnalysisContext newContext) { | |
| 8325 invoked[0] = true; | |
| 8326 return null; | |
| 8327 } | |
| 8328 } | |
| 8329 | |
| 8330 | |
| 8331 class TestAnalysisContext_test_extractContextInto extends TestAnalysisContext { | |
| 8332 List<bool> invoked; | |
| 8333 TestAnalysisContext_test_extractContextInto(this.invoked); | |
| 8334 @override | |
| 8335 InternalAnalysisContext extractContextInto(SourceContainer container, | |
| 8336 InternalAnalysisContext newContext) { | |
| 8337 invoked[0] = true; | |
| 8338 return null; | |
| 8339 } | |
| 8340 } | |
| 8341 | |
| 8342 | |
| 8343 class TestAnalysisContext_test_getAnalysisOptions extends TestAnalysisContext { | 8214 class TestAnalysisContext_test_getAnalysisOptions extends TestAnalysisContext { |
| 8344 List<bool> invoked; | 8215 List<bool> invoked; |
| 8345 TestAnalysisContext_test_getAnalysisOptions(this.invoked); | 8216 TestAnalysisContext_test_getAnalysisOptions(this.invoked); |
| 8346 @override | 8217 @override |
| 8347 AnalysisOptions get analysisOptions { | 8218 AnalysisOptions get analysisOptions { |
| 8348 invoked[0] = true; | 8219 invoked[0] = true; |
| 8349 return null; | 8220 return null; |
| 8350 } | 8221 } |
| 8351 } | 8222 } |
| 8352 | 8223 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8678 List<bool> invoked; | 8549 List<bool> invoked; |
| 8679 TestAnalysisContext_test_isServerLibrary(this.invoked); | 8550 TestAnalysisContext_test_isServerLibrary(this.invoked); |
| 8680 @override | 8551 @override |
| 8681 bool isServerLibrary(Source librarySource) { | 8552 bool isServerLibrary(Source librarySource) { |
| 8682 invoked[0] = true; | 8553 invoked[0] = true; |
| 8683 return false; | 8554 return false; |
| 8684 } | 8555 } |
| 8685 } | 8556 } |
| 8686 | 8557 |
| 8687 | 8558 |
| 8688 class TestAnalysisContext_test_mergeContext extends TestAnalysisContext { | |
| 8689 List<bool> invoked; | |
| 8690 TestAnalysisContext_test_mergeContext(this.invoked); | |
| 8691 @override | |
| 8692 void mergeContext(AnalysisContext context) { | |
| 8693 invoked[0] = true; | |
| 8694 } | |
| 8695 } | |
| 8696 | |
| 8697 | |
| 8698 class TestAnalysisContext_test_parseCompilationUnit extends TestAnalysisContext | 8559 class TestAnalysisContext_test_parseCompilationUnit extends TestAnalysisContext |
| 8699 { | 8560 { |
| 8700 List<bool> invoked; | 8561 List<bool> invoked; |
| 8701 TestAnalysisContext_test_parseCompilationUnit(this.invoked); | 8562 TestAnalysisContext_test_parseCompilationUnit(this.invoked); |
| 8702 @override | 8563 @override |
| 8703 CompilationUnit parseCompilationUnit(Source source) { | 8564 CompilationUnit parseCompilationUnit(Source source) { |
| 8704 invoked[0] = true; | 8565 invoked[0] = true; |
| 8705 return null; | 8566 return null; |
| 8706 } | 8567 } |
| 8707 } | 8568 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8823 List<bool> invoked; | 8684 List<bool> invoked; |
| 8824 TestAnalysisContext_test_setSourceFactory(this.invoked); | 8685 TestAnalysisContext_test_setSourceFactory(this.invoked); |
| 8825 @override | 8686 @override |
| 8826 void set sourceFactory(SourceFactory factory) { | 8687 void set sourceFactory(SourceFactory factory) { |
| 8827 invoked[0] = true; | 8688 invoked[0] = true; |
| 8828 } | 8689 } |
| 8829 } | 8690 } |
| 8830 | 8691 |
| 8831 | 8692 |
| 8832 /** | 8693 /** |
| 8833 * This subclass of DartEntryImpl allows test code to invoke the copyFrom() meth
od. | |
| 8834 */ | |
| 8835 class TestDartEntryImpl extends DartEntryImpl { | |
| 8836 @override | |
| 8837 void copyFrom(SourceEntryImpl entry) { | |
| 8838 super.copyFrom(entry); | |
| 8839 } | |
| 8840 } | |
| 8841 | |
| 8842 | |
| 8843 /** | |
| 8844 * Instances of the class `TestTaskVisitor` implement a task visitor that fails
if any of its | 8694 * Instances of the class `TestTaskVisitor` implement a task visitor that fails
if any of its |
| 8845 * methods are invoked. Subclasses typically override the expected methods to no
t cause a test | 8695 * methods are invoked. Subclasses typically override the expected methods to no
t cause a test |
| 8846 * failure. | 8696 * failure. |
| 8847 */ | 8697 */ |
| 8848 class TestTaskVisitor<E> implements AnalysisTaskVisitor<E> { | 8698 class TestTaskVisitor<E> implements AnalysisTaskVisitor<E> { |
| 8849 @override | 8699 @override |
| 8850 E visitGenerateDartErrorsTask(GenerateDartErrorsTask task) { | 8700 E visitGenerateDartErrorsTask(GenerateDartErrorsTask task) { |
| 8851 JUnitTestCase.fail("Unexpectedly invoked visitGenerateDartErrorsTask"); | 8701 JUnitTestCase.fail("Unexpectedly invoked visitGenerateDartErrorsTask"); |
| 8852 return null; | 8702 return null; |
| 8853 } | 8703 } |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9177 } | 9027 } |
| 9178 } | 9028 } |
| 9179 | 9029 |
| 9180 | 9030 |
| 9181 class _UniversalCachePartitionTest_test_setMaxCacheSize implements | 9031 class _UniversalCachePartitionTest_test_setMaxCacheSize implements |
| 9182 CacheRetentionPolicy { | 9032 CacheRetentionPolicy { |
| 9183 @override | 9033 @override |
| 9184 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => | 9034 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => |
| 9185 RetentionPriority.LOW; | 9035 RetentionPriority.LOW; |
| 9186 } | 9036 } |
| OLD | NEW |