{"size": 1273, "ext": "js", "max_stars_repo_path": "tests/nehan.box-size.js", "max_stars_repo_name": "tategakibunko/nehan.js", "max_stars_repo_stars_event_min_datetime": "2015-01-12T22:34:16.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-25T16:16:09.000Z", "max_issues_repo_path": "tests/nehan.box-size.js", "max_issues_repo_name": "tategakibunko/nehan.js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tests/nehan.box-size.js", "max_forks_repo_name": "tategakibunko/nehan.js", "max_forks_repo_forks_event_min_datetime": "2015-01-18T09:06:34.000Z", "max_forks_repo_forks_event_max_datetime": "2020-09-24T16:10:04.000Z"}
{"max_stars_count": 96, "max_issues_count": null, "max_forks_count": 12, "avg_line_length": 25.46, "max_line_length": 80, "alphanum_fraction": 0.6307934014}
describe("BoxSize", function(){
  var lr_tb = Nehan.BoxFlows.getByName("lr-tb");
  var tb_rl = Nehan.BoxFlows.getByName("tb-rl");
  var box = new Nehan.BoxSize(100, 200);

  it("BoxSize.clone", function(){
    var box2 = box.clone();
    expect(box2.width).toBe(box.width);
    expect(box2.height).toBe(box.height);
  });

  it("BoxSize.setMeasure", function(){
    var tmp = box.clone();
    tmp.setMeasure(lr_tb, 300);
    expect(tmp.width).toBe(300);

    tmp.setMeasure(tb_rl, 400);
    expect(tmp.height).toBe(400);
  });

  it("BoxSize.setExtent", function(){
    var tmp = box.clone();
    tmp.setExtent(lr_tb, 300);
    expect(tmp.height).toBe(300);

    tmp.setExtent(tb_rl, 400);
    expect(tmp.width).toBe(400);
  });

  it("BoxSize.getMeasure", function(){
    expect(box.getMeasure(lr_tb)).toBe(100);
    expect(box.getMeasure(tb_rl)).toBe(200);
  });

  it("BoxSize.getExtent", function(){
    expect(box.getExtent(lr_tb)).toBe(200);
    expect(box.getExtent(tb_rl)).toBe(100);
  });

  it("BoxSize.getCss", function(){
    var css = box.getCss();
    expect(css.width).toBe("100px");
    expect(css.height).toBe("200px");
  });

  it("BoxSize.isEqualTo", function(){
    expect(new Nehan.BoxSize(1,2).isEqualTo(new Nehan.BoxSize(1,2))).toBe(true);
  });
});
