<commit_before><html>
<head>
  <script src="../lib/OpenLayers.js"></script>
  <script type="text/javascript"><!--
    var map; 
    function test_01_Map_constructor (t) {
        t.plan( 12 );
        
        map = new OpenLayers.Map('map'); // no longer need to call $(), constructor does it
        t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map returns object" );
        t.ok( map.div instanceof HTMLDivElement, "map.div is an HTMLDivElement" );
        t.ok( map.controlDiv instanceof HTMLDivElement, "map.controlDiv is an HTMLDivElement" );
        t.ok( map.viewPortDiv instanceof HTMLDivElement, "map.viewPortDiv is an HTMLDivElement" );
        t.ok( map.layerContainerDiv instanceof HTMLDivElement, "map.layerContainerDiv is an HTMLDivElement" );
        t.ok( map.layerContainerDiv instanceof HTMLDivElement, "map.layerContainerDiv is an HTMLDivElement" );
        t.ok( map.layers instanceof Array, "map.layers is an Array" );
        t.ok( map.controls instanceof Array, "map.controls is an Array" );
        t.ok( map.events instanceof OpenLayers.Events, "map.events is an OpenLayers.Events" );
        t.ok( map.maxExtent instanceof OpenLayers.Bounds, "map.maxExtent is an OpenLayers.Bounds" );
        t.ok( map.maxZoomLevel > 0, "map.maxZoomLevel is set" );
        t.ok( map.maxResolution > 0, "map.maxResolution is set" );
    }
    function test_02_Map_center(t) {
        t.plan(5);
        map = new OpenLayers.Map($('map'));
        map.setCenter(new OpenLayers.LonLat(2,1), 0);
        t.ok( map.getCenter() instanceof OpenLayers.LonLat, "map.getCenter returns a LonLat");
        t.eq( map.getZoom(), 0, "map.zoom is correct after calling setCenter");
        t.eq( map.getResolution(), map.maxResolution, "map.getResolution() == map.maxResolution");
        t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter");
        t.eq( map.getCenter().lat, 1, "map center lat is correct after calling setCenter");
    }
    function test_03_Map_add_layers(t) {
        t.plan(5);
        map = new OpenLayers.Map($('map'));<commit_msg>Update map constructor test: we no longer have a Controls div. Also, remove duplicate test of 'ok map.layerContainerDiv is an HTMLDivElement'<commit_after><html>
<head>
  <script src="../lib/OpenLayers.js"></script>
  <script type="text/javascript"><!--
    var map; 
    function test_01_Map_constructor (t) {
        t.plan( 10 );
        
        map = new OpenLayers.Map('map'); // no longer need to call $(), constructor does it
        t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map returns object" );
        t.ok( map.div instanceof HTMLDivElement, "map.div is an HTMLDivElement" );
        t.ok( map.viewPortDiv instanceof HTMLDivElement, "map.viewPortDiv is an HTMLDivElement" );
        t.ok( map.layerContainerDiv instanceof HTMLDivElement, "map.layerContainerDiv is an HTMLDivElement" );
        t.ok( map.layers instanceof Array, "map.layers is an Array" );
        t.ok( map.controls instanceof Array, "map.controls is an Array" );
        t.ok( map.events instanceof OpenLayers.Events, "map.events is an OpenLayers.Events" );
        t.ok( map.maxExtent instanceof OpenLayers.Bounds, "map.maxExtent is an OpenLayers.Bounds" );
        t.ok( map.maxZoomLevel > 0, "map.maxZoomLevel is set" );
        t.ok( map.maxResolution > 0, "map.maxResolution is set" );
    }
    function test_02_Map_center(t) {
        t.plan(5);
        map = new OpenLayers.Map($('map'));
        map.setCenter(new OpenLayers.LonLat(2,1), 0);
        t.ok( map.getCenter() instanceof OpenLayers.LonLat, "map.getCenter returns a LonLat");
        t.eq( map.getZoom(), 0, "map.zoom is correct after calling setCenter");
        t.eq( map.getResolution(), map.maxResolution, "map.getResolution() == map.maxResolution");
        t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter");
        t.eq( map.getCenter().lat, 1, "map center lat is correct after calling setCenter");
    }
    function test_03_Map_add_layers(t) {
        t.plan(5);
        map = new OpenLayers.Map($('map'));
{'fraction_non_alphanumeric': 0.13157894736842105, 'fraction_numerical': 0.008771929824561403, 'mean_word_length': 3.1173520561685053, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1160513', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1275, 'n_words': 353}