1 This testcase implements a somewhat complex dependency chain to stress 2 test the compiler module resolving. 3 4 The dependency tree is: 5 6 root 7 + mod1 8 + mod4 9 + mod8 10 + mod2 11 + mod4 12 + mod6 13 + mod8 14 + mod9 15 + mod3 16 + mod4 17 + mod6 18 + mod4 19 + mod5 20 + mod1 21 + mod4 22 + mod8 23 + mod2 24 + mod4 25 + mod6 26 + mod8 27 + mod9 28 + mod4 29 + mod6 30 + mod8 31 + mod9 32 + mod4 33 + mod6 34 + mod6 35 + mod7 36 + mod5 37 + mod1 38 + mod4 39 + mod8 40 + mod2 41 + mod4 42 + mod6 43 + mod8 44 + mod9 45 + mod4 46 + mod6 47 + mod8 48 + mod9 49 + mod4 50 + mod6 51 + mod6 52 + mod8 53 54 -- Testcase -- 55 import mod1 from 'mod1'; 56 import mod2 from 'mod2'; 57 import mod3 from 'mod3'; 58 import mod4 from 'mod4'; 59 import mod5 from 'mod5'; 60 import mod6 from 'mod6'; 61 import mod7 from 'mod7'; 62 import mod8 from 'mod8'; 63 64 print("root: ", [ mod1, mod2, mod3, mod4, mod5, mod6, mod7, mod8 ], "\n"); 65 -- End -- 66 67 -- File mod1.uc -- 68 import mod4 from 'mod4'; 69 import mod8 from 'mod8'; 70 71 print("mod1: ", [ mod4, mod8 ], "\n"); 72 73 export default 'mod1'; 74 -- End -- 75 76 -- File mod2.uc -- 77 import mod9 from 'mod9'; 78 import mod4 from 'mod4'; 79 import mod8 from 'mod8'; 80 import mod6 from 'mod6'; 81 82 print("mod2: ", [ mod4, mod6, mod8, mod9 ], "\n"); 83 84 export default 'mod2'; 85 -- End -- 86 87 -- File mod3.uc -- 88 import mod4 from 'mod4'; 89 import mod6 from 'mod6'; 90 91 print("mod3: ", [ mod4, mod6 ], "\n"); 92 93 export default 'mod3'; 94 -- End -- 95 96 -- File mod4.uc -- 97 export default 'mod4'; 98 -- End -- 99 100 -- File mod5.uc -- 101 import mod1 from 'mod1'; 102 import mod4 from 'mod4'; 103 import mod2 from 'mod2'; 104 import mod9 from 'mod9'; 105 import mod8 from 'mod8'; 106 import mod6 from 'mod6'; 107 108 print("mod5: ", [ mod1, mod2, mod4, mod6, mod8, mod9 ], "\n"); 109 110 export default 'mod5'; 111 -- End -- 112 113 -- File mod6.uc -- 114 export default 'mod6'; 115 -- End -- 116 117 -- File mod7.uc -- 118 import mod6 from 'mod6'; 119 import mod5 from 'mod5'; 120 121 print("mod7: ", [ mod5, mod6 ], "\n"); 122 123 export default 'mod7'; 124 -- End -- 125 126 -- File mod8.uc -- 127 export default 'mod8'; 128 -- End -- 129 130 -- File mod9.uc -- 131 import mod4 from 'mod4'; 132 import mod6 from 'mod6'; 133 134 print("mod9: ", [ mod4, mod6 ], "\n"); 135 136 export default 'mod9'; 137 -- End -- 138 139 -- Args -- 140 -R -L files/ 141 -- End -- 142 143 -- Expect stdout -- 144 mod1: [ "mod4", "mod8" ] 145 mod9: [ "mod4", "mod6" ] 146 mod2: [ "mod4", "mod6", "mod8", "mod9" ] 147 mod3: [ "mod4", "mod6" ] 148 mod5: [ "mod1", "mod2", "mod4", "mod6", "mod8", "mod9" ] 149 mod7: [ "mod5", "mod6" ] 150 root: [ "mod1", "mod2", "mod3", "mod4", "mod5", "mod6", "mod7", "mod8" ] 151 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt