Skip to content

Commit

Permalink
Remove tests ported to test262
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomato committed Mar 14, 2022
1 parent f6b3a10 commit e7e99ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions polyfill/test/instant.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,6 @@ describe('Instant', () => {
it(`(${two}).subtract({ hours: 480, nanoseconds: 1600 }) = ${one}`, () => assert(three.equals(one)));
it(`(${one}).add({ hours: 480, nanoseconds: 1600 }) = ${two}`, () => assert(four.equals(two)));
});
it('inst.add(durationObj)', () => {
const later = inst.add(Temporal.Duration.from('PT240H0.000000800S'));
equal(`${later}`, '1970-01-04T12:23:45.678902034Z');
});
it('invalid to add years, months, weeks, or days', () => {
throws(() => inst.add({ years: 1 }), RangeError);
throws(() => inst.add({ months: 1 }), RangeError);
throws(() => inst.add({ weeks: 1 }), RangeError);
throws(() => inst.add({ days: 1 }), RangeError);
});
it('mixed positive and negative values always throw', () => {
throws(() => inst.add({ hours: 1, minutes: -30 }), RangeError);
});
Expand All @@ -257,16 +247,6 @@ describe('Instant', () => {
});
describe('Instant.subtract works', () => {
const inst = Instant.from('1969-12-25T12:23:45.678901234Z');
it('inst.subtract(durationObj)', () => {
const earlier = inst.subtract(Temporal.Duration.from('PT240H0.000000800S'));
equal(`${earlier}`, '1969-12-15T12:23:45.678900434Z');
});
it('invalid to subtract years, months, weeks, or days', () => {
throws(() => inst.subtract({ years: 1 }), RangeError);
throws(() => inst.subtract({ months: 1 }), RangeError);
throws(() => inst.subtract({ weeks: 1 }), RangeError);
throws(() => inst.subtract({ days: 1 }), RangeError);
});
it('mixed positive and negative values always throw', () => {
throws(() => inst.subtract({ hours: 1, minutes: -30 }), RangeError);
});
Expand Down
2 changes: 1 addition & 1 deletion polyfill/test262
Submodule test262 updated 58 files
+4 −0 features.txt
+31 −0 test/built-ins/Array/prototype/Symbol.unscopables/array-find-from-last.js
+31 −0 test/built-ins/Array/prototype/Symbol.unscopables/array-grouping.js
+9 −33 test/built-ins/Array/prototype/Symbol.unscopables/value.js
+16 −0 test/built-ins/Temporal/Duration/basic.js
+15 −0 test/built-ins/Temporal/Duration/call-builtin.js
+3 −2 test/built-ins/Temporal/Duration/days-undefined.js
+5 −7 test/built-ins/Temporal/Duration/from/argument-existing-object.js
+26 −0 test/built-ins/Temporal/Duration/from/argument-object-invalid.js
+32 −0 test/built-ins/Temporal/Duration/from/argument-string-invalid.js
+48 −0 test/built-ins/Temporal/Duration/from/argument-string.js
+3 −2 test/built-ins/Temporal/Duration/hours-undefined.js
+3 −2 test/built-ins/Temporal/Duration/microseconds-undefined.js
+3 −2 test/built-ins/Temporal/Duration/milliseconds-undefined.js
+3 −2 test/built-ins/Temporal/Duration/minutes-undefined.js
+19 −0 test/built-ins/Temporal/Duration/mixed.js
+6 −5 test/built-ins/Temporal/Duration/months-undefined.js
+3 −2 test/built-ins/Temporal/Duration/nanoseconds-undefined.js
+3 −1 test/built-ins/Temporal/Duration/prototype/round/roundingmode-invalid-string.js
+24 −0 test/built-ins/Temporal/Duration/prototype/toString/balance.js
+3 −1 test/built-ins/Temporal/Duration/prototype/toString/fractionalseconddigits-invalid-string.js
+2 −0 test/built-ins/Temporal/Duration/prototype/toString/fractionalseconddigits-out-of-range.js
+30 −3 test/built-ins/Temporal/Duration/prototype/toString/negative-components.js
+3 −1 test/built-ins/Temporal/Duration/prototype/toString/roundingmode-invalid-string.js
+4 −1 test/built-ins/Temporal/Duration/prototype/toString/smallestunit-invalid-string.js
+3 −2 test/built-ins/Temporal/Duration/seconds-undefined.js
+3 −2 test/built-ins/Temporal/Duration/weeks-undefined.js
+7 −4 test/built-ins/Temporal/Duration/years-undefined.js
+72 −0 test/built-ins/Temporal/Instant/prototype/add/basic.js
+11 −9 test/built-ins/Temporal/Instant/prototype/add/branding.js
+31 −0 test/built-ins/Temporal/Instant/prototype/add/disallowed-duration-units.js
+16 −2 test/built-ins/Temporal/Instant/prototype/add/result-out-of-range.js
+3 −1 test/built-ins/Temporal/Instant/prototype/round/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/Instant/prototype/since/roundingmode-invalid-string.js
+72 −0 test/built-ins/Temporal/Instant/prototype/subtract/basic.js
+11 −9 test/built-ins/Temporal/Instant/prototype/subtract/branding.js
+31 −0 test/built-ins/Temporal/Instant/prototype/subtract/disallowed-duration-units.js
+17 −3 test/built-ins/Temporal/Instant/prototype/subtract/result-out-of-range.js
+3 −1 test/built-ins/Temporal/Instant/prototype/toString/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/Instant/prototype/until/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainDateTime/prototype/since/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainDateTime/prototype/toString/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-invalid-string.js
+1 −1 test/built-ins/Temporal/PlainTime/prototype/round/roundingmode-invalid-string.js
+1 −2 test/built-ins/Temporal/PlainTime/prototype/since/roundingmode-invalid-string.js
+1 −1 test/built-ins/Temporal/PlainTime/prototype/toString/roundingmode-invalid-string.js
+1 −2 test/built-ins/Temporal/PlainTime/prototype/until/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainYearMonth/prototype/since/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/PlainYearMonth/prototype/until/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/ZonedDateTime/prototype/round/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/ZonedDateTime/prototype/since/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/ZonedDateTime/prototype/toString/roundingmode-invalid-string.js
+3 −1 test/built-ins/Temporal/ZonedDateTime/prototype/until/roundingmode-invalid-string.js
+1 −1 test/intl402/NumberFormat/prototype/formatRange/x-greater-than-y-throws.js
+1 −1 test/intl402/NumberFormat/prototype/formatRangeToParts/x-greater-than-y-throws.js

0 comments on commit e7e99ac

Please sign in to comment.