summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/six-speed/tests/defaults.es5
blob: eec3f0d2e7e80cb63557e6d391d52c2d45e5586e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function fn(arg, other) {
  arg = arg === undefined ? 1 : arg;
  other = other === undefined ? 3 : other;
  return other;
}

assertEqual(fn(), 3);
assertEqual(fn(1, 2), 2);

test(function() {
  fn();
  fn(2);
  fn(2, 4);
});