You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

incModelTests.xml 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
  2. <suite>
  3. <!--
  4. In order for these tests to pass you have to flip this flag to true:
  5. AsmManager.attemptIncrementalModelRepairs
  6. If you want to debug the output from the tests, you might want uncomment
  7. the static initializer in AsmManager which will enable you to collect
  8. detailed information on model processing.
  9. -->
  10. <!--
  11. These tests utilise the inc-compile test harness option but I've extended it
  12. with a checkModel option which enables me to check information about the model
  13. after a incremental compilation step.
  14. -->
  15. <!--
  16. asm relationships for inter type declarations are tricky things.
  17. Today, because type mungers don't remember where they came from in attribute form,
  18. the relationships for ITDs are created during source compilation. When building incrementally,
  19. we are really doing a binary weave of 'everything else' with the source for the file that
  20. has changed. In this case the relationships for ITDs are not added. This makes managing
  21. them incrementally in the model rather tough!
  22. The solution is to make them remember where they came from. This would mean we can create
  23. the relationships during weave time and so they will be created when either doing a
  24. source compilation or a binary weave. The support is in ResolvedTypeMunger to remember
  25. where they came from (you just have to flick a switch) but I haven't switched it on
  26. because we need to version *all* aspectj attributes properly so that we don't end up with
  27. a migration nightmare. If ITD attributes remembered their location in a particular version
  28. of AspectJ then everyone would need to recompile their code from source with that version.
  29. If we keep changing the attributes, we keep having this problem. If we include a *version*
  30. number in every attribute we can make the compiler more robust to coping with 'old' attributes
  31. that might be missing certain options or values.
  32. Hence the first test here is not complete...
  33. -->
  34. <ajc-test dir="incremental/model/introduction"
  35. title="Testing incremental structure model: Intertype declarations (and a declare parents)"
  36. keywords="incremental-test,model-test" >
  37. <compile staging="true" options="-incremental,-emacssym" sourceroots="."/>
  38. <inc-compile tag="20"/> <!-- Just 'touched' one file -->
  39. <inc-compile tag="30"/> <!-- Just 'touched another aspect -->
  40. </ajc-test>
  41. <ajc-test dir="incremental/model/intertype"
  42. title="Testing incremental structure model: Intertype field declarations"
  43. keywords="incremental-test,model-test" >
  44. <compile staging="true" options="-incremental,-emacssym" sourceroots="."/>
  45. <inc-compile tag="20" checkModel="inter-type field=2,RelationshipMapSize=3"/> <!-- BetaA intertypes int i and String s -->
  46. <inc-compile tag="30" checkModel="inter-type field=1,RelationshipMapSize=2"/> <!-- BetaA takes the String intertype away -->
  47. </ajc-test>
  48. <ajc-test dir="incremental/model/weaving2"
  49. title="Testing incremental structure model: Weaving handlers"
  50. keywords="incremental-test,model-test" >
  51. <compile staging="true" options="-incremental,-emacssym" sourceroots="."/>
  52. <inc-compile tag="20" checkModel="code=1,advice=1,RelationshipMapSize=2"/> <!-- BetaA has a new piece of handler advice added -->
  53. <inc-compile tag="30" checkModel="code=1,advice=2,RelationshipMapSize=3"/> <!-- secondary.GammaA added, also advises the same handler -->
  54. <inc-compile tag="40" checkModel="code=1,advice=1,RelationshipMapSize=2"/> <!-- primary.BetaA deleted -->
  55. </ajc-test>
  56. <ajc-test dir="incremental/model/weaving"
  57. title="Testing incremental structure model: Weaving"
  58. keywords="incremental-test,model-test" >
  59. <compile staging="true" options="-incremental,-emacssym" sourceroots="."/>
  60. <inc-compile tag="20" checkModel="code=2,advice=2,java source file=3,RelationshipMapSize=4"/> <!-- BetaA has a new piece of advice added -->
  61. <inc-compile tag="30" checkModel="code=1,advice=1,RelationshipMapSize=2"/> <!-- BetaA has a piece of advice removed -->
  62. <inc-compile tag="40" checkModel="code=0,RelationshipMapSize=0,advice=0"/> <!-- BetaA other piece of advice removed (now empty) -->
  63. </ajc-test>
  64. <ajc-test dir="incremental/model/sourcefiles_updating"
  65. title="Testing incremental structure model: Updating files"
  66. keywords="incremental-test,model-test" >
  67. <compile staging="true" options="-incremental,-emacssym" sourceroots="."/>
  68. <!-- On first compile, 5 source files in model, 'root','Alpha','Beta','Gamma','Delta' -->
  69. <inc-compile tag="20" checkModel="java source file=5,method=4,class=3,FileMapSize=4"/> <!-- Beta changed, method added -->
  70. <inc-compile tag="30" checkModel="java source file=5,method=4,class=4,advice=1"/> <!-- Delta changed, class added -->
  71. <inc-compile tag="40" checkModel="advice=2"/> <!-- Gamma changed, advice added -->
  72. <inc-compile tag="50" checkModel="advice=2,pointcut=1"/> <!-- Gamma changed, pointcut added -->
  73. <inc-compile tag="60" checkModel="advice=0,pointcut=1"/> <!-- Gamma changed, both advice removed -->
  74. </ajc-test>
  75. <ajc-test dir="incremental/model/sourcefiles_addremove"
  76. title="Testing incremental structure model: Adding and removing files"
  77. keywords="incremental-test,model-test" >
  78. <compile staging="true" options="-incremental,-emacssym" sourceroots="."/>
  79. <!-- On first compile, two source files in model, 'root' and 'Alpha' -->
  80. <inc-compile tag="20" checkModel="java source file=3,FileMapSize=2"/> <!-- Adds primary.Beta class -->
  81. <inc-compile tag="30" checkModel="java source file=4"/> <!-- Adds secondary.Gamma aspect -->
  82. <inc-compile tag="40" checkModel="java source file=5,package=2,FileMapSize=4"/> <!-- Adds seconday.Delta class -->
  83. <inc-compile tag="50" checkModel="java source file=4,package=2"/> <!-- Deletes Gamma aspect -->
  84. <inc-compile tag="60" checkModel="java source file=2,FileMapSize=1"/> <!-- Deletes Beta and Delta classes -->
  85. </ajc-test>
  86. </suite>