( name )
| 853 | } |
| 854 | |
| 855 | function checkPollution( name ) { |
| 856 | var old = config.pollution; |
| 857 | saveGlobal(); |
| 858 | |
| 859 | var newGlobals = diff( old, config.pollution ); |
| 860 | if ( newGlobals.length > 0 ) { |
| 861 | ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); |
| 862 | config.current.expected++; |
| 863 | } |
| 864 | |
| 865 | var deletedGlobals = diff( config.pollution, old ); |
| 866 | if ( deletedGlobals.length > 0 ) { |
| 867 | ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); |
| 868 | config.current.expected++; |
| 869 | } |
| 870 | } |
| 871 | |
| 872 | // returns a new Array with the elements that are in a but not in b |
| 873 | function diff( a, b ) { |
no test coverage detected