( name )
| 956 | } |
| 957 | |
| 958 | function checkPollution( name ) { |
| 959 | var old = config.pollution; |
| 960 | saveGlobal(); |
| 961 | |
| 962 | var newGlobals = diff( config.pollution, old ); |
| 963 | if ( newGlobals.length > 0 ) { |
| 964 | ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); |
| 965 | } |
| 966 | |
| 967 | var deletedGlobals = diff( old, config.pollution ); |
| 968 | if ( deletedGlobals.length > 0 ) { |
| 969 | ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); |
| 970 | } |
| 971 | } |
| 972 | |
| 973 | // returns a new Array with the elements that are in a but not in b |
| 974 | function diff( a, b ) { |
no test coverage detected
searching dependent graphs…