<commit_before>(function() {
    module("Custos");
  
    // <zone lry="331" lrx="208" xml:id="m-5ff17ad0-6396-4f4b-9c99-de55e140ee97" uly="278" ulx="190"/>
    var clef_bb = [190, 278, 208, 331];
    // <zone xml:id="m-0ac66c2a-bebd-493a-94bc-cfa2a0ba0489" lry="406" lrx="1450" uly="302" ulx="190"/>
    var staff_bb = [190, 302, 406, 1450];
    // <zone xml:id="m-569cd97f-8c90-41b9-b2ad-4fd71ec52b8a" ulx="1439" uly="310" lrx="1446" lry="345"/>
    var custos_bb = [1439, 310, 1446, 345];

    test("Constructor", function() {
        cModel = new Toe.Model.Custos("a", 3);

        ok(cModel.props.interact);
        equal(cModel.pname, "a");
        equal(cModel.oct, 3);
        equal(cModel.rootStaffPos, null);
        deepEqual(cModel.zone, new Object());
        equal(cModel.id, null);
        equal(cModel.staff, null);

        cModel = new Toe.Model.Custos("c", 4, {interact: false});
        ok(!cModel.props.interact);
    });

    test("Set Bounding Box", function() {
        cModel = new Toe.Model.Custos("f", 2);

        // test invalid bounding box argument
        raises(function() { 
            cModel.setBoundingBox([-100,0,-200,0]);
        });


        cModel.setBoundingBox(custos_bb);

        equal(cModel.zone.ulx, custos_bb[0]);
        equal(cModel.zone.uly, custos_bb[1]);
        equal(cModel.zone.lrx, custos_bb[2]);
        equal(cModel.zone.lry, custos_bb[3]);

        // test float truncation
        float_bb = $.map(custos_bb, function(el) { return el + 0.432; });
        cModel.setBoundingBox(float_bb);

        equal(cModel.zone.ulx, custos_bb[0]);
        equal(cModel.zone.uly, custos_bb[1]);
        equal(cModel.zone.lrx, custos_bb[2]);
        equal(cModel.zone.lry, custos_bb[3]);
<commit_msg>Minor custos test syntax fixes<commit_after>(function() {
    module("Custos");
  
    // <zone lry="331" lrx="208" xml:id="m-5ff17ad0-6396-4f4b-9c99-de55e140ee97" uly="278" ulx="190"/>
    var clef_bb = [190, 278, 208, 331];
    // <zone xml:id="m-0ac66c2a-bebd-493a-94bc-cfa2a0ba0489" lry="406" lrx="1450" uly="302" ulx="190"/>
    var staff_bb = [190, 302, 406, 1450];
    // <zone xml:id="m-569cd97f-8c90-41b9-b2ad-4fd71ec52b8a" ulx="1439" uly="310" lrx="1446" lry="345"/>
    var custos_bb = [1439, 310, 1446, 345];

    test("Constructor", function() {
        var cModel = new Toe.Model.Custos("a", 3);

        ok(cModel.props.interact);
        equal(cModel.pname, "a");
        equal(cModel.oct, 3);
        equal(cModel.rootStaffPos, null);
        deepEqual(cModel.zone, new Object());
        equal(cModel.id, null);
        equal(cModel.staff, null);

        cModel = new Toe.Model.Custos("c", 4, {interact: false});
        ok(!cModel.props.interact);
    });

    test("Set Bounding Box", function() {
        var cModel = new Toe.Model.Custos("f", 2);

        // test invalid bounding box argument
        raises(function() { 
            cModel.setBoundingBox([-100,0,-200,0]);
        });


        cModel.setBoundingBox(custos_bb);

        equal(cModel.zone.ulx, custos_bb[0]);
        equal(cModel.zone.uly, custos_bb[1]);
        equal(cModel.zone.lrx, custos_bb[2]);
        equal(cModel.zone.lry, custos_bb[3]);

        // test float truncation
        float_bb = $.map(custos_bb, function(el) { return el + 0.432; });
        cModel.setBoundingBox(float_bb);

        equal(cModel.zone.ulx, custos_bb[0]);
        equal(cModel.zone.uly, custos_bb[1]);
        equal(cModel.zone.lrx, custos_bb[2]);
        equal(cModel.zone.lry, custos_bb[3]);

{'fraction_non_alphanumeric': 0.1772223800056802, 'fraction_numerical': 0.08804316955410395, 'mean_word_length': 2.726984126984127, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '6230279', 'n_tokens_mistral': 1580, 'n_tokens_neox': 1374, 'n_words': 220}