<commit_before>function genAllTypeGeometries() {
    var center = new Z.Coordinate(118.846825, 32.046534);
    var w = 200, h = 200, r = 200;
    return [
        new Z.Marker(center),
        new maptalks.Label('test label', center),
        new Z.Circle(center, r),
        new Z.Ellipse(center, w, h),
        new Z.Rectangle(center, w, h),
        new Z.Sector(center, r, 90, 180),
        new Z.Polyline([
            {x: 121.111, y: 30.111},
            {x: 121.222, y: 30.222}
        ]),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:0, arrowStyle:'classic'}),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:1, arcDegree:120, arrowStyle:'classic', arrowPlacement:'point'}),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:2, arrowStyle:'classic', arrowPlacement:'point'}),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:3, arcDegree:120, arrowStyle:'classic', arrowPlacement:'point'}),
        new Z.Polygon([
            [
                {x: 121.111, y: 30.111},
                {x: 121.222, y: 30.222},
                {x: 121.333, y: 30.333}
            ]
        ]),
        new Z.MultiPolyline([
            [
                {x: 121.111, y: 30.111},
                {x: 121.222, y: 30.222}
            ],
            [
                {x: 121.333, y: 30.333},
                {x: 121.444, y: 30.444}
            ]
        ]),
        new Z.MultiPolygon([
            [
                [
                    {x: 121.111, y: 30.111},
                    {x: 121.222, y: 30.222},
                    {x: 121.333, y: 30.333}
                ]
            ],
            [
                [
                    {x: 121.444, y: 30.444},
                    {x: 121.555, y: 30.555},
                    {x: 121.666, y: 30.666}
                ]
            ]
        ])
    ];
    // return geometries;
}

/*exports = module.exports = {
    genAllTypeGeometries: genAllTypeGeometries
};*/

expect.Assertion.prototype.nearCoord = function(expected, delta) {
    delta = delta || 1e-6;
    expect(this.obj.x).to.be.within(expected.x - delta, expected.x + delta);
    expect(this.obj.y).to.be.within(expected.y - delta, expected.y + delta);
};

/**
 * 共同的地图初始化方法
 * @param  {Coordinate} center 中心点坐标
 * @return {Object}        初始化后的容器坐标
 */
function commonSetupMap(center) {
    var container = document.createElement('div');
    container.style.width = '800px';
    container.style.height = '600px';
    document.body.appendChild(container);
    var option = {
        enableCartoCSS: false,
        zoom: 17,
        center: center
    };
    var map = new Z.Map(container, option);
    var tile = new Z.TileLayer('tile', {

        urlTemplate:"http://t{s}.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}",
        subdomains: [1, 2, 3]
    });
    map.setBaseLayer(tile);
    return {
        "container":container,
        "map":map,
        "base":tile
    };
}

/**
 * 共同的地图销毁方法
 */
function commonTearDownMap() {

}


var GeoSymbolTester = {
    markerSymbols : [
            {
                "marker-placement":"point", //point | line | interior
                "marker-file"   : "images/resource/marker.png",
                //设定marker-file后, 只有下面的属性起作用
                "marker-width"  : 20,
                "marker-height" : 20,
                "marker-opacity": 1,
                //两个cartocss里没有的扩展属性, 用来标注相对中心点的像素距离
                "marker-dx"     : 0, //<-------
                "marker-dy"     : 0  //<-------
            },
            {
                "marker-placement":"point", //point | line | interior

                //marker-type中定义了若干cartoCSS中没有的属性值
                "marker-type": "ellipse", //<----- ellipse | triangle | square | bar等,默认ellipse
                "marker-opacity": 1,
                "marker-fill": "#ff0000",
                "marker-fill-opacity": 1,
                "marker-line-color": "#0000ff",
                "marker-line-width": 1,
                "marker-line-opacity": 1,
                "marker-width": 30,
                "marker-height": 30,

                "marker-dx": 0,
                "marker-dy": 0
            },
            {
                "text-placement"    : "point", // point | vertex | line | interior

                "text-name"         : "文本标注：[marker_name]",
                "text-face-name"    : "arial",
                "text-size"         : 12,
                "text-fill"         : "#550033",
                "text-opacity"      : 1,
                "text-halo-fill"  : "#fff",
                "text-halo-radius": 0,

                "text-dx"           : 0,
                "text-dy"           : 0,

                "text-horizontal-alignment" : "middle", //left | middle | right | auto
                "text-vertical-alignment"   : "middle",   // top | middle | bottom | auto
                "text-align"                : "left" //left | right | center | auto
            },
            {
                "shield-placement"  : "point", // point | vertex | line | interior

                "shield-file"       : "images/resource/marker.png",

                "shield-name"       : "文本标注：[marker_name]",
                "shield-face-name"  : "arial",
                "shield-size"       :  12,
                "shield-fill"       : "#550033",
                "shield-opacity"    :  1,
                "shield-text-opacity": 1,
                "shield-halo-fill"  : "#fff",
                "shield-halo-radius": 0,

                "shield-dx"         :  0,
                "shield-dy"         :  0,
                "shield-text-dx"    :  0,
                "shield-text-dy"    :  0,

                "shield-horizontal-alignment"   : "middle", //left | middle | right | auto
                "shield-vertical-alignment"     : "middle",   // top | middle | bottom | auto
                "shield-justify-alignment"      : "left" //left | right | center | auto
            }
    ],

    lineAndFill: {
                "line-pattern-file" : "images/resource/marker.png",
                "line-color"        : "#f00",
                "line-width"        : 5,
                "line-opacity"      : 1,
                "line-join"         : "miter", //round bevel
                "line-cap"          : "round", //butt square
                "line-dasharray"    : [20, 5, 20],
                "polygon-pattern-file"  : "images/resource/marker.png",
                "polygon-fill"          : "#f00",
                "polygon-opacity"       : 1
            },

    testGeoSymbols:function(geometry, map) {
        // return;<commit_msg>remove Shield in Specs<commit_after>function genAllTypeGeometries() {
    var center = new Z.Coordinate(118.846825, 32.046534);
    var w = 200, h = 200, r = 200;
    return [
        new Z.Marker(center),
        new maptalks.Label('test label', center),
        new Z.Circle(center, r),
        new Z.Ellipse(center, w, h),
        new Z.Rectangle(center, w, h),
        new Z.Sector(center, r, 90, 180),
        new Z.Polyline([
            {x: 121.111, y: 30.111},
            {x: 121.222, y: 30.222}
        ]),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:0, arrowStyle:'classic'}),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:1, arcDegree:120, arrowStyle:'classic', arrowPlacement:'point'}),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:2, arrowStyle:'classic', arrowPlacement:'point'}),
        new maptalks.CurveLine(
                //线端点坐标数组
                [[121.48416288620015,31.24488412311837],[121.48394830947899,31.242664302121515],[121.48595460182202,31.242535881128543],[121.48695238357557,31.244838259576046],[121.48944147354125,31.24487495041167],[121.49018176322932,31.242664302121515],[121.49290688758839,31.242765204207824],[121.49358280426011,31.245040058995645],[121.49601825004554,31.245159303904526],[121.49715550666777,31.242921143583686]],
                //bezierCurveDegree指贝塞尔曲线的度, 取值为2或者3即二阶贝塞尔曲线或三阶贝塞尔曲线
                {curveType:3, arcDegree:120, arrowStyle:'classic', arrowPlacement:'point'}),
        new Z.Polygon([
            [
                {x: 121.111, y: 30.111},
                {x: 121.222, y: 30.222},
                {x: 121.333, y: 30.333}
            ]
        ]),
        new Z.MultiPolyline([
            [
                {x: 121.111, y: 30.111},
                {x: 121.222, y: 30.222}
            ],
            [
                {x: 121.333, y: 30.333},
                {x: 121.444, y: 30.444}
            ]
        ]),
        new Z.MultiPolygon([
            [
                [
                    {x: 121.111, y: 30.111},
                    {x: 121.222, y: 30.222},
                    {x: 121.333, y: 30.333}
                ]
            ],
            [
                [
                    {x: 121.444, y: 30.444},
                    {x: 121.555, y: 30.555},
                    {x: 121.666, y: 30.666}
                ]
            ]
        ])
    ];
    // return geometries;
}

/*exports = module.exports = {
    genAllTypeGeometries: genAllTypeGeometries
};*/

expect.Assertion.prototype.nearCoord = function(expected, delta) {
    delta = delta || 1e-6;
    expect(this.obj.x).to.be.within(expected.x - delta, expected.x + delta);
    expect(this.obj.y).to.be.within(expected.y - delta, expected.y + delta);
};

/**
 * 共同的地图初始化方法
 * @param  {Coordinate} center 中心点坐标
 * @return {Object}        初始化后的容器坐标
 */
function commonSetupMap(center) {
    var container = document.createElement('div');
    container.style.width = '800px';
    container.style.height = '600px';
    document.body.appendChild(container);
    var option = {
        enableCartoCSS: false,
        zoom: 17,
        center: center
    };
    var map = new Z.Map(container, option);
    var tile = new Z.TileLayer('tile', {

        urlTemplate:"http://t{s}.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}",
        subdomains: [1, 2, 3]
    });
    map.setBaseLayer(tile);
    return {
        "container":container,
        "map":map,
        "base":tile
    };
}

/**
 * 共同的地图销毁方法
 */
function commonTearDownMap() {

}


var GeoSymbolTester = {
    markerSymbols : [
            {
                "marker-placement":"point", //point | line | interior
                "marker-file"   : "images/resource/marker.png",
                //设定marker-file后, 只有下面的属性起作用
                "marker-width"  : 20,
                "marker-height" : 20,
                "marker-opacity": 1,
                //两个cartocss里没有的扩展属性, 用来标注相对中心点的像素距离
                "marker-dx"     : 0, //<-------
                "marker-dy"     : 0  //<-------
            },
            {
                "marker-placement":"point", //point | line | interior

                //marker-type中定义了若干cartoCSS中没有的属性值
                "marker-type": "ellipse", //<----- ellipse | triangle | square | bar等,默认ellipse
                "marker-opacity": 1,
                "marker-fill": "#ff0000",
                "marker-fill-opacity": 1,
                "marker-line-color": "#0000ff",
                "marker-line-width": 1,
                "marker-line-opacity": 1,
                "marker-width": 30,
                "marker-height": 30,

                "marker-dx": 0,
                "marker-dy": 0
            },
            {
                "text-placement"    : "point", // point | vertex | line | interior

                "text-name"         : "文本标注：[marker_name]",
                "text-face-name"    : "arial",
                "text-size"         : 12,
                "text-fill"         : "#550033",
                "text-opacity"      : 1,
                "text-halo-fill"  : "#fff",
                "text-halo-radius": 0,

                "text-dx"           : 0,
                "text-dy"           : 0,

                "text-horizontal-alignment" : "middle", //left | middle | right | auto
                "text-vertical-alignment"   : "middle",   // top | middle | bottom | auto
                "text-align"                : "left" //left | right | center | auto
            }/*,
            {
                "shield-placement"  : "point", // point | vertex | line | interior

                "shield-file"       : "images/resource/marker.png",

                "shield-name"       : "文本标注：[marker_name]",
                "shield-face-name"  : "arial",
                "shield-size"       :  12,
                "shield-fill"       : "#550033",
                "shield-opacity"    :  1,
                "shield-text-opacity": 1,
                "shield-halo-fill"  : "#fff",
                "shield-halo-radius": 0,

                "shield-dx"         :  0,
                "shield-dy"         :  0,
                "shield-text-dx"    :  0,
                "shield-text-dy"    :  0,

                "shield-horizontal-alignment"   : "middle", //left | middle | right | auto
                "shield-vertical-alignment"     : "middle",   // top | middle | bottom | auto
                "shield-justify-alignment"      : "left" //left | right | center | auto
            }*/
    ],

    lineAndFill: {
                "line-pattern-file" : "images/resource/marker.png",
                "line-color"        : "#f00",
                "line-width"        : 5,
                "line-opacity"      : 1,
                "line-join"         : "miter", //round bevel
                "line-cap"          : "round", //butt square
                "line-dasharray"    : [20, 5, 20],
                "polygon-pattern-file"  : "images/resource/marker.png",
                "polygon-fill"          : "#f00",
                "polygon-opacity"       : 1
            },

    testGeoSymbols:function(geometry, map) {
        // return;
{'fraction_non_alphanumeric': 0.1448888372903001, 'fraction_numerical': 0.1907470830672781, 'mean_word_length': 1.655363748458693, 'pattern_counts': {'":': 40, '<': 9, '<?xml version=': 0, '>': 3, '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': '6391875', 'n_tokens_mistral': 8291, 'n_tokens_neox': 6145, 'n_words': 774}