opal 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +17 -0
- data/CHANGELOG.md +35 -1
- data/Gemfile +1 -0
- data/HACKING.md +47 -26
- data/benchmark/benchmarks +415 -103
- data/benchmark/bm_call_overhead.yml +28 -0
- data/benchmark/run.rb +61 -40
- data/docs/cdp_common.json +3364 -0
- data/docs/cdp_common.md +18 -0
- data/docs/{headless_chrome.md → headless_browsers.md} +31 -12
- data/lib/opal/ast/builder.rb +1 -1
- data/lib/opal/builder.rb +6 -1
- data/lib/opal/builder_processors.rb +5 -3
- data/lib/opal/cache.rb +1 -7
- data/lib/opal/cli_options.rb +72 -58
- data/lib/opal/cli_runners/chrome.rb +47 -9
- data/lib/opal/cli_runners/chrome_cdp_interface.rb +238 -112
- data/lib/opal/cli_runners/compiler.rb +146 -13
- data/lib/opal/cli_runners/deno.rb +32 -0
- data/lib/opal/cli_runners/firefox.rb +350 -0
- data/lib/opal/cli_runners/firefox_cdp_interface.rb +212 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.cmd +17 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.ps1 +28 -0
- data/lib/opal/cli_runners/node_modules/.package-lock.json +41 -0
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/LICENSE +1 -1
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/README.md +322 -182
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/bin/client.js +99 -114
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/chrome-remote-interface.js +1 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/index.js +16 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/api.js +41 -33
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/chrome.js +224 -214
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/devtools.js +71 -191
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/external-request.js +26 -6
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/protocol.json +20788 -9049
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/websocket-wrapper.js +10 -3
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/package.json +59 -123
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/webpack.config.js +25 -32
- data/lib/opal/cli_runners/node_modules/commander/History.md +298 -0
- data/lib/opal/cli_runners/node_modules/commander/LICENSE +22 -0
- data/lib/opal/cli_runners/node_modules/commander/Readme.md +217 -61
- data/lib/opal/cli_runners/node_modules/commander/index.js +431 -145
- data/lib/opal/cli_runners/node_modules/commander/package.json +16 -79
- data/lib/opal/cli_runners/node_modules/ws/README.md +334 -98
- data/lib/opal/cli_runners/node_modules/ws/browser.js +8 -0
- data/lib/opal/cli_runners/node_modules/ws/index.js +5 -10
- data/lib/opal/cli_runners/node_modules/ws/lib/buffer-util.js +129 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/constants.js +10 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/event-target.js +184 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/extension.js +223 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/limiter.js +55 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/permessage-deflate.js +518 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/receiver.js +607 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/sender.js +409 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/stream.js +180 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/validation.js +104 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket-server.js +447 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket.js +1195 -0
- data/lib/opal/cli_runners/node_modules/ws/package.json +40 -106
- data/lib/opal/cli_runners/package-lock.json +62 -0
- data/lib/opal/cli_runners/package.json +1 -1
- data/lib/opal/cli_runners.rb +26 -4
- data/lib/opal/nodes/args/prepare_post_args.rb +2 -2
- data/lib/opal/nodes/def.rb +8 -8
- data/lib/opal/nodes/iter.rb +12 -12
- data/lib/opal/nodes/logic.rb +1 -1
- data/lib/opal/nodes/masgn.rb +2 -2
- data/lib/opal/parser/with_ruby_lexer.rb +1 -1
- data/lib/opal/paths.rb +14 -0
- data/lib/opal/rewriter.rb +2 -0
- data/lib/opal/rewriters/forward_args.rb +52 -4
- data/lib/opal/rewriters/targeted_patches.rb +94 -0
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/basic_object.rb +1 -1
- data/opal/corelib/boolean.rb +2 -2
- data/opal/corelib/class.rb +11 -0
- data/opal/corelib/constants.rb +3 -3
- data/opal/corelib/enumerable.rb +4 -0
- data/opal/corelib/enumerator.rb +1 -1
- data/opal/corelib/hash.rb +2 -2
- data/opal/corelib/helpers.rb +1 -1
- data/opal/corelib/kernel.rb +3 -3
- data/opal/corelib/method.rb +1 -1
- data/opal/corelib/module.rb +29 -8
- data/opal/corelib/proc.rb +7 -5
- data/opal/corelib/runtime.js +141 -78
- data/opal/corelib/set.rb +252 -0
- data/opal/corelib/string.rb +2 -1
- data/opal/corelib/time.rb +2 -2
- data/opal/opal.rb +1 -0
- data/opal.gemspec +1 -0
- data/spec/filters/bugs/array.rb +22 -13
- data/spec/filters/bugs/base64.rb +5 -5
- data/spec/filters/bugs/basicobject.rb +16 -8
- data/spec/filters/bugs/bigdecimal.rb +161 -160
- data/spec/filters/bugs/binding.rb +10 -10
- data/spec/filters/bugs/class.rb +8 -8
- data/spec/filters/bugs/complex.rb +2 -1
- data/spec/filters/bugs/date.rb +79 -81
- data/spec/filters/bugs/datetime.rb +29 -29
- data/spec/filters/bugs/delegate.rb +1 -3
- data/spec/filters/bugs/encoding.rb +69 -69
- data/spec/filters/bugs/enumerable.rb +22 -20
- data/spec/filters/bugs/enumerator.rb +88 -85
- data/spec/filters/bugs/exception.rb +46 -40
- data/spec/filters/bugs/file.rb +32 -32
- data/spec/filters/bugs/float.rb +26 -21
- data/spec/filters/bugs/freeze.rb +88 -0
- data/spec/filters/bugs/hash.rb +39 -38
- data/spec/filters/bugs/integer.rb +57 -44
- data/spec/filters/bugs/io.rb +1 -1
- data/spec/filters/bugs/kernel.rb +349 -269
- data/spec/filters/bugs/language.rb +220 -188
- data/spec/filters/bugs/main.rb +5 -3
- data/spec/filters/bugs/marshal.rb +38 -38
- data/spec/filters/bugs/math.rb +2 -1
- data/spec/filters/bugs/method.rb +73 -62
- data/spec/filters/bugs/module.rb +163 -143
- data/spec/filters/bugs/numeric.rb +6 -6
- data/spec/filters/bugs/objectspace.rb +16 -16
- data/spec/filters/bugs/openstruct.rb +1 -1
- data/spec/filters/bugs/pack_unpack.rb +51 -51
- data/spec/filters/bugs/pathname.rb +7 -7
- data/spec/filters/bugs/proc.rb +63 -63
- data/spec/filters/bugs/random.rb +7 -6
- data/spec/filters/bugs/range.rb +12 -9
- data/spec/filters/bugs/rational.rb +8 -7
- data/spec/filters/bugs/regexp.rb +49 -48
- data/spec/filters/bugs/ruby-32.rb +56 -0
- data/spec/filters/bugs/set.rb +30 -30
- data/spec/filters/bugs/singleton.rb +4 -4
- data/spec/filters/bugs/string.rb +187 -99
- data/spec/filters/bugs/stringio.rb +7 -0
- data/spec/filters/bugs/stringscanner.rb +68 -68
- data/spec/filters/bugs/struct.rb +11 -9
- data/spec/filters/bugs/symbol.rb +1 -1
- data/spec/filters/bugs/time.rb +78 -63
- data/spec/filters/bugs/trace_point.rb +4 -4
- data/spec/filters/bugs/unboundmethod.rb +32 -17
- data/spec/filters/bugs/warnings.rb +8 -12
- data/spec/filters/unsupported/array.rb +24 -107
- data/spec/filters/unsupported/basicobject.rb +12 -12
- data/spec/filters/unsupported/bignum.rb +27 -52
- data/spec/filters/unsupported/class.rb +1 -2
- data/spec/filters/unsupported/delegator.rb +3 -3
- data/spec/filters/unsupported/enumerable.rb +2 -9
- data/spec/filters/unsupported/enumerator.rb +2 -11
- data/spec/filters/unsupported/file.rb +1 -1
- data/spec/filters/unsupported/float.rb +28 -47
- data/spec/filters/unsupported/hash.rb +8 -14
- data/spec/filters/unsupported/integer.rb +75 -91
- data/spec/filters/unsupported/kernel.rb +17 -35
- data/spec/filters/unsupported/language.rb +11 -19
- data/spec/filters/unsupported/marshal.rb +22 -41
- data/spec/filters/unsupported/matchdata.rb +28 -52
- data/spec/filters/unsupported/math.rb +1 -1
- data/spec/filters/unsupported/privacy.rb +229 -285
- data/spec/filters/unsupported/range.rb +1 -5
- data/spec/filters/unsupported/regexp.rb +40 -66
- data/spec/filters/unsupported/set.rb +2 -2
- data/spec/filters/unsupported/singleton.rb +4 -4
- data/spec/filters/unsupported/string.rb +305 -508
- data/spec/filters/unsupported/struct.rb +3 -4
- data/spec/filters/unsupported/symbol.rb +15 -18
- data/spec/filters/unsupported/thread.rb +1 -7
- data/spec/filters/unsupported/time.rb +159 -202
- data/spec/filters/unsupported/usage_of_files.rb +170 -259
- data/spec/lib/builder_spec.rb +4 -4
- data/spec/lib/rewriters/forward_args_spec.rb +32 -12
- data/spec/mspec-opal/runner.rb +2 -0
- data/spec/ruby_specs +4 -0
- data/stdlib/deno/base.rb +28 -0
- data/stdlib/deno/file.rb +340 -0
- data/stdlib/{headless_chrome.rb → headless_browser/base.rb} +1 -1
- data/stdlib/headless_browser/file.rb +15 -0
- data/stdlib/headless_browser.rb +4 -0
- data/stdlib/native.rb +1 -1
- data/stdlib/nodejs/file.rb +5 -0
- data/stdlib/opal/platform.rb +8 -6
- data/stdlib/opal-platform.rb +14 -8
- data/stdlib/set.rb +1 -258
- data/tasks/benchmarking.rake +62 -19
- data/tasks/performance.rake +1 -1
- data/tasks/testing.rake +5 -3
- data/test/nodejs/test_file.rb +29 -10
- data/test/opal/http_server.rb +28 -11
- data/test/opal/unsupported_and_bugs.rb +2 -1
- metadata +89 -50
- data/lib/opal/cli_runners/node_modules/ultron/LICENSE +0 -22
- data/lib/opal/cli_runners/node_modules/ultron/index.js +0 -138
- data/lib/opal/cli_runners/node_modules/ultron/package.json +0 -112
- data/lib/opal/cli_runners/node_modules/ws/SECURITY.md +0 -33
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.fallback.js +0 -56
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.js +0 -15
- data/lib/opal/cli_runners/node_modules/ws/lib/ErrorCodes.js +0 -28
- data/lib/opal/cli_runners/node_modules/ws/lib/EventTarget.js +0 -158
- data/lib/opal/cli_runners/node_modules/ws/lib/Extensions.js +0 -69
- data/lib/opal/cli_runners/node_modules/ws/lib/PerMessageDeflate.js +0 -339
- data/lib/opal/cli_runners/node_modules/ws/lib/Receiver.js +0 -520
- data/lib/opal/cli_runners/node_modules/ws/lib/Sender.js +0 -438
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.fallback.js +0 -9
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.js +0 -17
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocket.js +0 -705
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocketServer.js +0 -336
- data/spec/filters/bugs/boolean.rb +0 -3
- data/spec/filters/bugs/matrix.rb +0 -3
- data/spec/filters/unsupported/fixnum.rb +0 -15
- data/spec/filters/unsupported/freeze.rb +0 -102
- data/spec/filters/unsupported/pathname.rb +0 -4
- data/spec/filters/unsupported/proc.rb +0 -4
- data/spec/filters/unsupported/random.rb +0 -5
- data/spec/filters/unsupported/taint.rb +0 -162
@@ -1,10 +1,10 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "BigDecimal" do
|
3
|
-
fails "BidDecimal#hash two BigDecimal objects with numerically equal values should have the same hash value" #
|
4
|
-
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for NaNs" #
|
5
|
-
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for infinite values" #
|
6
|
-
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for ordinary values" #
|
7
|
-
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for zero values" #
|
3
|
+
fails "BidDecimal#hash two BigDecimal objects with numerically equal values should have the same hash value" # Expected 27618 == 27622 to be truthy but was false
|
4
|
+
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for NaNs" # Expected 27486 == 27490 to be truthy but was false
|
5
|
+
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for infinite values" # Expected 27530 == 27534 to be truthy but was false
|
6
|
+
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for ordinary values" # Expected 27574 == 27578 to be truthy but was false
|
7
|
+
fails "BidDecimal#hash two BigDecimal objects with the same value should have the same hash for zero values" # Expected 27442 == 27446 to be truthy but was false
|
8
8
|
fails "BigDecimal constants defines a VERSION value" # Expected false to be true
|
9
9
|
fails "BigDecimal constants exception-related constants has a EXCEPTION_ALL value" # NameError: uninitialized constant BigDecimal::EXCEPTION_ALL
|
10
10
|
fails "BigDecimal constants exception-related constants has a EXCEPTION_INFINITY value" # NameError: uninitialized constant BigDecimal::EXCEPTION_INFINITY
|
@@ -15,196 +15,198 @@ opal_filter "BigDecimal" do
|
|
15
15
|
fails "BigDecimal constants has a BASE value" # NameError: uninitialized constant BigDecimal::BASE
|
16
16
|
fails "BigDecimal constants has a NaN value" # NameError: uninitialized constant BigDecimal::NAN
|
17
17
|
fails "BigDecimal constants has an INFINITY value" # NameError: uninitialized constant BigDecimal::INFINITY
|
18
|
-
fails "BigDecimal constants rounding-related constants has a ROUND_CEILING value" # Expected 2 to
|
19
|
-
fails "BigDecimal constants rounding-related constants has a ROUND_DOWN value" # Expected 1 to
|
20
|
-
fails "BigDecimal constants rounding-related constants has a ROUND_FLOOR value" # Expected 3 to
|
21
|
-
fails "BigDecimal constants rounding-related constants has a ROUND_HALF_DOWN value" # Expected 5 to
|
22
|
-
fails "BigDecimal constants rounding-related constants has a ROUND_HALF_EVEN value" # Expected 6 to
|
23
|
-
fails "BigDecimal constants rounding-related constants has a ROUND_HALF_UP value" # Expected 4 to
|
24
|
-
fails "BigDecimal constants rounding-related constants has a ROUND_UP value" # Expected 0 to
|
25
|
-
fails "BigDecimal is not defined unless it is required" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
26
|
-
fails "BigDecimal#% returns NaN if NaN is involved"
|
27
|
-
fails "BigDecimal#% returns NaN if the dividend is Infinity"
|
28
|
-
fails "BigDecimal#% returns self modulo other"
|
29
|
-
fails "BigDecimal#% returns the dividend if the divisor is Infinity"
|
18
|
+
fails "BigDecimal constants rounding-related constants has a ROUND_CEILING value" # Expected 2 == 5 to be truthy but was false
|
19
|
+
fails "BigDecimal constants rounding-related constants has a ROUND_DOWN value" # Expected 1 == 2 to be truthy but was false
|
20
|
+
fails "BigDecimal constants rounding-related constants has a ROUND_FLOOR value" # Expected 3 == 6 to be truthy but was false
|
21
|
+
fails "BigDecimal constants rounding-related constants has a ROUND_HALF_DOWN value" # Expected 5 == 4 to be truthy but was false
|
22
|
+
fails "BigDecimal constants rounding-related constants has a ROUND_HALF_EVEN value" # Expected 6 == 7 to be truthy but was false
|
23
|
+
fails "BigDecimal constants rounding-related constants has a ROUND_HALF_UP value" # Expected 4 == 3 to be truthy but was false
|
24
|
+
fails "BigDecimal constants rounding-related constants has a ROUND_UP value" # Expected 0 == 1 to be truthy but was false
|
25
|
+
fails "BigDecimal is not defined unless it is required" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0xe876>
|
26
|
+
fails "BigDecimal#% returns NaN if NaN is involved" # FloatDomainError: Computation results to 'NaN'(Not a Number)
|
27
|
+
fails "BigDecimal#% returns NaN if the dividend is Infinity" # FloatDomainError: Computation results to 'Infinity'
|
28
|
+
fails "BigDecimal#% returns self modulo other" # Exception: new BigNumber() number type has more than 15 significant digits: 18446744073709552000
|
29
|
+
fails "BigDecimal#% returns the dividend if the divisor is Infinity" # Expected NaN == 1 to be truthy but was false
|
30
30
|
fails "BigDecimal#% with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(6543.21) exactly 1 times but received it 0 times
|
31
31
|
fails "BigDecimal#* with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(3e-20001) exactly 1 times but received it 0 times
|
32
|
-
fails "BigDecimal#* with Rational produces a BigDecimal" #
|
33
|
-
fails "BigDecimal#** 0 to power of 0 is 1"
|
34
|
-
fails "BigDecimal#** 0 to powers < 0 is Infinity"
|
35
|
-
fails "BigDecimal#** other powers of 0 are 0"
|
36
|
-
fails "BigDecimal#** powers of 1 equal 1"
|
37
|
-
fails "BigDecimal#** powers of self"
|
38
|
-
fails "BigDecimal#** returns 0.0 if self is infinite and argument is negative"
|
39
|
-
fails "BigDecimal#** returns NaN if self is NaN"
|
40
|
-
fails "BigDecimal#** returns infinite if self is infinite and argument is positive"
|
32
|
+
fails "BigDecimal#* with Rational produces a BigDecimal" # TypeError: Rational can't be coerced into BigDecimal
|
33
|
+
fails "BigDecimal#** 0 to power of 0 is 1" # NoMethodError: undefined method `**' for 0
|
34
|
+
fails "BigDecimal#** 0 to powers < 0 is Infinity" # NoMethodError: undefined method `**' for 0
|
35
|
+
fails "BigDecimal#** other powers of 0 are 0" # NoMethodError: undefined method `**' for 0
|
36
|
+
fails "BigDecimal#** powers of 1 equal 1" # NoMethodError: undefined method `**' for 1
|
37
|
+
fails "BigDecimal#** powers of self" # NoMethodError: undefined method `**' for 3e-20001
|
38
|
+
fails "BigDecimal#** returns 0.0 if self is infinite and argument is negative" # NoMethodError: undefined method `**' for Infinity
|
39
|
+
fails "BigDecimal#** returns NaN if self is NaN" # NoMethodError: undefined method `**' for NaN
|
40
|
+
fails "BigDecimal#** returns infinite if self is infinite and argument is positive" # NoMethodError: undefined method `**' for Infinity
|
41
41
|
fails "BigDecimal#+ with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(1) exactly 1 times but received it 0 times
|
42
42
|
fails "BigDecimal#- with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(1) exactly 1 times but received it 0 times
|
43
|
-
fails "BigDecimal#-@ properly handles special values"
|
44
|
-
fails "BigDecimal#/ returns a / b" #
|
43
|
+
fails "BigDecimal#-@ properly handles special values" # Expected 1 == -1 to be truthy but was false
|
44
|
+
fails "BigDecimal#/ returns a / b" # Expected 0 == -5e-5556 to be truthy but was false
|
45
45
|
fails "BigDecimal#/ with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(1) exactly 1 times but received it 0 times
|
46
|
-
fails "BigDecimal#/ with Rational produces a BigDecimal" #
|
47
|
-
fails "BigDecimal#< properly handles infinity values" #
|
48
|
-
fails "BigDecimal#<= properly handles infinity values" #
|
49
|
-
fails "BigDecimal#<=> returns -1 if a < b" #
|
50
|
-
fails "BigDecimal#<=> returns 1 if a > b" #
|
51
|
-
fails "BigDecimal#> properly handles infinity values" #
|
52
|
-
fails "BigDecimal#>= properly handles infinity values" #
|
46
|
+
fails "BigDecimal#/ with Rational produces a BigDecimal" # TypeError: Rational can't be coerced into BigDecimal
|
47
|
+
fails "BigDecimal#< properly handles infinity values" # NoMethodError: undefined method `nan?' for #<MockObject:0x753b4 @name="123" @null=nil>
|
48
|
+
fails "BigDecimal#<= properly handles infinity values" # NoMethodError: undefined method `nan?' for #<MockObject:0x72144 @name="123" @null=nil>
|
49
|
+
fails "BigDecimal#<=> returns -1 if a < b" # Expected nil == -1 to be truthy but was false
|
50
|
+
fails "BigDecimal#<=> returns 1 if a > b" # Expected nil == 1 to be truthy but was false
|
51
|
+
fails "BigDecimal#> properly handles infinity values" # NoMethodError: undefined method `nan?' for #<MockObject:0x718a0 @name="123" @null=nil>
|
52
|
+
fails "BigDecimal#>= properly handles infinity values" # NoMethodError: undefined method `nan?' for #<MockObject:0x71c3a @name="123" @null=nil>
|
53
53
|
fails "BigDecimal#add with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(123450000000000) exactly 1 times but received it 0 times
|
54
|
-
fails "BigDecimal#add with Rational produces a BigDecimal" #
|
55
|
-
fails "BigDecimal#ceil returns the smallest integer greater or equal to self, if n is unspecified"
|
56
|
-
fails "BigDecimal#ceil sets n digits left of the decimal point to 0, if given n < 0"
|
57
|
-
fails "BigDecimal#coerce returns [other, self] both as BigDecimal"
|
58
|
-
fails "BigDecimal#div returns a / b with optional precision" #
|
54
|
+
fails "BigDecimal#add with Rational produces a BigDecimal" # TypeError: Rational can't be coerced into BigDecimal
|
55
|
+
fails "BigDecimal#ceil returns the smallest integer greater or equal to self, if n is unspecified" # Expected Infinity == 2e+5555 to be truthy but was false
|
56
|
+
fails "BigDecimal#ceil sets n digits left of the decimal point to 0, if given n < 0" # Expected 13346 == 13400 to be truthy but was false
|
57
|
+
fails "BigDecimal#coerce returns [other, self] both as BigDecimal" # Exception: new BigNumber() number type has more than 15 significant digits: 32434234234234233000
|
58
|
+
fails "BigDecimal#div returns a / b with optional precision" # Expected "0.33333333333333333333" == "0.333333333333333333333" to be truthy but was false
|
59
59
|
fails "BigDecimal#div with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(1) exactly 1 times but received it 0 times
|
60
|
-
fails "BigDecimal#div with precision set to 0 returns a / b" #
|
60
|
+
fails "BigDecimal#div with precision set to 0 returns a / b" # Expected 0 == -5e-5556 to be truthy but was false
|
61
61
|
fails "BigDecimal#div with precision set to 0 with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(1) exactly 1 times but received it 0 times
|
62
|
-
fails "BigDecimal#divmod array contains quotient and modulus as BigDecimal"
|
63
|
-
fails "BigDecimal#divmod can be reversed with * and +" # Expected 0 to
|
64
|
-
fails "BigDecimal#divmod returns an array of Infinity and NaN if the dividend is Infinity"
|
65
|
-
fails "BigDecimal#divmod returns an array of two NaNs if NaN is involved"
|
66
|
-
fails "BigDecimal#divmod returns an array of zero and the dividend if the divisor is Infinity"
|
67
|
-
fails "BigDecimal#exponent is n if number can be represented as 0.xxx*10**n"
|
68
|
-
fails "BigDecimal#exponent returns 0 if self is 0"
|
69
|
-
fails "BigDecimal#exponent returns an Integer"
|
70
|
-
fails "BigDecimal#fix correctly handles special values"
|
71
|
-
fails "BigDecimal#fix does not allow any arguments"
|
72
|
-
fails "BigDecimal#fix returns 0 if the absolute value is < 1"
|
73
|
-
fails "BigDecimal#fix returns a BigDecimal"
|
74
|
-
fails "BigDecimal#fix returns the integer part of the absolute value"
|
75
|
-
fails "BigDecimal#floor raise exception, if self is special value"
|
76
|
-
fails "BigDecimal#floor returns the greatest integer smaller or equal to self"
|
77
|
-
fails "BigDecimal#floor sets n digits left of the decimal point to 0, if given n < 0"
|
78
|
-
fails "BigDecimal#frac correctly handles special values"
|
79
|
-
fails "BigDecimal#frac returns 0 if the value is 0"
|
80
|
-
fails "BigDecimal#frac returns 0 if the value is an integer"
|
81
|
-
fails "BigDecimal#frac returns a BigDecimal"
|
82
|
-
fails "BigDecimal#frac returns the fractional part of the absolute value"
|
83
|
-
fails "BigDecimal#inspect does not add an exponent for zero values" #
|
84
|
-
fails "BigDecimal#inspect looks like this"
|
85
|
-
fails "BigDecimal#mod_part_of_divmod returns NaN if NaN is involved"
|
86
|
-
fails "BigDecimal#mod_part_of_divmod returns NaN if the dividend is Infinity"
|
87
|
-
fails "BigDecimal#mod_part_of_divmod returns self modulo other"
|
88
|
-
fails "BigDecimal#mod_part_of_divmod returns the dividend if the divisor is Infinity"
|
62
|
+
fails "BigDecimal#divmod array contains quotient and modulus as BigDecimal" # Expected [0, 1] == [-1, -1] to be truthy but was false
|
63
|
+
fails "BigDecimal#divmod can be reversed with * and +" # Expected 0 == -1 to be truthy but was false
|
64
|
+
fails "BigDecimal#divmod returns an array of Infinity and NaN if the dividend is Infinity" # FloatDomainError: Computation results to 'Infinity'
|
65
|
+
fails "BigDecimal#divmod returns an array of two NaNs if NaN is involved" # FloatDomainError: Computation results to 'NaN'(Not a Number)
|
66
|
+
fails "BigDecimal#divmod returns an array of zero and the dividend if the divisor is Infinity" # Expected NaN == 1 to be truthy but was false
|
67
|
+
fails "BigDecimal#exponent is n if number can be represented as 0.xxx*10**n" # NoMethodError: undefined method `exponent' for 2e+1000
|
68
|
+
fails "BigDecimal#exponent returns 0 if self is 0" # NoMethodError: undefined method `exponent' for 0
|
69
|
+
fails "BigDecimal#exponent returns an Integer" # NoMethodError: undefined method `exponent' for Infinity
|
70
|
+
fails "BigDecimal#fix correctly handles special values" # NoMethodError: undefined method `fix' for Infinity
|
71
|
+
fails "BigDecimal#fix does not allow any arguments" # Expected ArgumentError but got: NoMethodError (undefined method `fix' for 1.23456789)
|
72
|
+
fails "BigDecimal#fix returns 0 if the absolute value is < 1" # NoMethodError: undefined method `fix' for 0.99999
|
73
|
+
fails "BigDecimal#fix returns a BigDecimal" # NoMethodError: undefined method `fix' for Infinity
|
74
|
+
fails "BigDecimal#fix returns the integer part of the absolute value" # NoMethodError: undefined method `fix' for 2e+1000
|
75
|
+
fails "BigDecimal#floor raise exception, if self is special value" # Expected FloatDomainError but no exception was raised (Infinity was returned)
|
76
|
+
fails "BigDecimal#floor returns the greatest integer smaller or equal to self" # Expected Infinity == 2e+5555 to be truthy but was false
|
77
|
+
fails "BigDecimal#floor sets n digits left of the decimal point to 0, if given n < 0" # Expected -9.999999999999999e+29 == -1e+30 to be truthy but was false
|
78
|
+
fails "BigDecimal#frac correctly handles special values" # NoMethodError: undefined method `frac' for Infinity
|
79
|
+
fails "BigDecimal#frac returns 0 if the value is 0" # NoMethodError: undefined method `frac' for 0
|
80
|
+
fails "BigDecimal#frac returns 0 if the value is an integer" # NoMethodError: undefined method `frac' for 2e+5555
|
81
|
+
fails "BigDecimal#frac returns a BigDecimal" # NoMethodError: undefined method `frac' for 2e+5555
|
82
|
+
fails "BigDecimal#frac returns the fractional part of the absolute value" # NoMethodError: undefined method `frac' for 1.23456789
|
83
|
+
fails "BigDecimal#inspect does not add an exponent for zero values" # Expected "0" == "0.0" to be truthy but was false
|
84
|
+
fails "BigDecimal#inspect looks like this" # Expected "1234.5678" == "0.12345678e4" to be truthy but was false
|
85
|
+
fails "BigDecimal#mod_part_of_divmod returns NaN if NaN is involved" # FloatDomainError: Computation results to 'NaN'(Not a Number)
|
86
|
+
fails "BigDecimal#mod_part_of_divmod returns NaN if the dividend is Infinity" # FloatDomainError: Computation results to 'Infinity'
|
87
|
+
fails "BigDecimal#mod_part_of_divmod returns self modulo other" # Exception: new BigNumber() number type has more than 15 significant digits: 18446744073709552000
|
88
|
+
fails "BigDecimal#mod_part_of_divmod returns the dividend if the divisor is Infinity" # Expected NaN == 1 to be truthy but was false
|
89
89
|
fails "BigDecimal#mod_part_of_divmod with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(6543.21) exactly 1 times but received it 0 times
|
90
90
|
fails "BigDecimal#modulo returns NaN if NaN is involved" # FloatDomainError: Computation results to 'NaN'(Not a Number)
|
91
91
|
fails "BigDecimal#modulo returns NaN if the dividend is Infinity" # FloatDomainError: Computation results to 'Infinity'
|
92
|
-
fails "BigDecimal#modulo returns self modulo other" # Exception: new BigNumber() number type has more than 15 significant digits:
|
93
|
-
fails "BigDecimal#modulo returns the dividend if the divisor is Infinity" # Expected NaN to
|
92
|
+
fails "BigDecimal#modulo returns self modulo other" # Exception: new BigNumber() number type has more than 15 significant digits: 18446744073709552000
|
93
|
+
fails "BigDecimal#modulo returns the dividend if the divisor is Infinity" # Expected NaN == 1 to be truthy but was false
|
94
94
|
fails "BigDecimal#modulo with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(6543.21) exactly 1 times but received it 0 times
|
95
95
|
fails "BigDecimal#mult with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(3e-20001) exactly 1 times but received it 0 times
|
96
|
-
fails "BigDecimal#power 0 to power of 0 is 1"
|
97
|
-
fails "BigDecimal#power 0 to powers < 0 is Infinity"
|
98
|
-
fails "BigDecimal#power other powers of 0 are 0"
|
99
|
-
fails "BigDecimal#power powers of 1 equal 1"
|
100
|
-
fails "BigDecimal#power powers of self"
|
101
|
-
fails "BigDecimal#power returns 0.0 if self is infinite and argument is negative"
|
102
|
-
fails "BigDecimal#power returns NaN if self is NaN"
|
103
|
-
fails "BigDecimal#power returns infinite if self is infinite and argument is positive"
|
104
|
-
fails "BigDecimal#precs returns Integers as array values"
|
105
|
-
fails "BigDecimal#precs returns array of two values"
|
106
|
-
fails "BigDecimal#precs returns the current value of significant digits as the first value"
|
107
|
-
fails "BigDecimal#precs returns the maximum number of significant digits as the second value"
|
108
|
-
fails "BigDecimal#quo returns a / b" #
|
96
|
+
fails "BigDecimal#power 0 to power of 0 is 1" # NoMethodError: undefined method `power' for 0
|
97
|
+
fails "BigDecimal#power 0 to powers < 0 is Infinity" # NoMethodError: undefined method `power' for 0
|
98
|
+
fails "BigDecimal#power other powers of 0 are 0" # NoMethodError: undefined method `power' for 0
|
99
|
+
fails "BigDecimal#power powers of 1 equal 1" # NoMethodError: undefined method `power' for 1
|
100
|
+
fails "BigDecimal#power powers of self" # NoMethodError: undefined method `power' for 3e-20001
|
101
|
+
fails "BigDecimal#power returns 0.0 if self is infinite and argument is negative" # NoMethodError: undefined method `power' for Infinity
|
102
|
+
fails "BigDecimal#power returns NaN if self is NaN" # NoMethodError: undefined method `power' for NaN
|
103
|
+
fails "BigDecimal#power returns infinite if self is infinite and argument is positive" # NoMethodError: undefined method `power' for Infinity
|
104
|
+
fails "BigDecimal#precs returns Integers as array values" # NameError: uninitialized constant BigDecimal::BASE
|
105
|
+
fails "BigDecimal#precs returns array of two values" # NameError: uninitialized constant BigDecimal::BASE
|
106
|
+
fails "BigDecimal#precs returns the current value of significant digits as the first value" # NameError: uninitialized constant BigDecimal::BASE
|
107
|
+
fails "BigDecimal#precs returns the maximum number of significant digits as the second value" # NameError: uninitialized constant BigDecimal::BASE
|
108
|
+
fails "BigDecimal#quo returns a / b" # Expected 0 == -5e-5556 to be truthy but was false
|
109
109
|
fails "BigDecimal#quo with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(1) exactly 1 times but received it 0 times
|
110
|
-
fails "BigDecimal#remainder coerces arguments to BigDecimal if possible"
|
111
|
-
fails "BigDecimal#remainder it equals modulo, if both values are of same sign"
|
112
|
-
fails "BigDecimal#remainder means self-arg*(self/arg).truncate"
|
113
|
-
fails "BigDecimal#remainder raises TypeError if the argument cannot be coerced to BigDecimal"
|
114
|
-
fails "BigDecimal#remainder returns NaN if Infinity is involved"
|
115
|
-
fails "BigDecimal#remainder returns NaN if NaN is involved"
|
116
|
-
fails "BigDecimal#remainder returns NaN used with zero"
|
117
|
-
fails "BigDecimal#remainder returns zero if used on zero"
|
110
|
+
fails "BigDecimal#remainder coerces arguments to BigDecimal if possible" # NoMethodError: undefined method `remainder' for 3
|
111
|
+
fails "BigDecimal#remainder it equals modulo, if both values are of same sign" # NoMethodError: undefined method `remainder' for 1.234567890123456789012345679e+27
|
112
|
+
fails "BigDecimal#remainder means self-arg*(self/arg).truncate" # NoMethodError: undefined method `remainder' for 1.23456789
|
113
|
+
fails "BigDecimal#remainder raises TypeError if the argument cannot be coerced to BigDecimal" # Expected TypeError but got: NoMethodError (undefined method `remainder' for 1)
|
114
|
+
fails "BigDecimal#remainder returns NaN if Infinity is involved" # NoMethodError: undefined method `remainder' for Infinity
|
115
|
+
fails "BigDecimal#remainder returns NaN if NaN is involved" # NoMethodError: undefined method `remainder' for NaN
|
116
|
+
fails "BigDecimal#remainder returns NaN used with zero" # NoMethodError: undefined method `remainder' for 1.23456789
|
117
|
+
fails "BigDecimal#remainder returns zero if used on zero" # NoMethodError: undefined method `remainder' for 0
|
118
118
|
fails "BigDecimal#remainder with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(3) exactly 1 times but received it 0 times
|
119
|
-
fails "BigDecimal#round :banker rounds values > 5 up, < 5 down and == 5 towards even neighbor" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
120
|
-
fails "BigDecimal#round :ceil rounds values towards +infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
121
|
-
fails "BigDecimal#round :ceiling rounds values towards +infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
122
|
-
fails "BigDecimal#round :default rounds values >= 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
123
|
-
fails "BigDecimal#round :down rounds values towards zero" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
124
|
-
fails "BigDecimal#round :floor rounds values towards -infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
125
|
-
fails "BigDecimal#round :half_down rounds values > 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
126
|
-
fails "BigDecimal#round :half_even rounds values > 5 up, < 5 down and == 5 towards even neighbor" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
127
|
-
fails "BigDecimal#round :half_up rounds values >= 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
128
|
-
fails "BigDecimal#round :truncate rounds values towards zero" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
129
|
-
fails "BigDecimal#round :up rounds values away from zero" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
130
|
-
fails "BigDecimal#round BigDecimal::ROUND_CEILING rounds values towards +infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
131
|
-
fails "BigDecimal#round BigDecimal::ROUND_DOWN rounds values towards zero" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
132
|
-
fails "BigDecimal#round BigDecimal::ROUND_FLOOR rounds values towards -infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
133
|
-
fails "BigDecimal#round BigDecimal::ROUND_HALF_DOWN rounds values > 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
134
|
-
fails "BigDecimal#round BigDecimal::ROUND_HALF_EVEN rounds values > 5 up, < 5 down and == 5 towards even neighbor" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
135
|
-
fails "BigDecimal#round BigDecimal::ROUND_HALF_UP rounds values >= 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
136
|
-
fails "BigDecimal#round BigDecimal::ROUND_UP rounds values away from zero" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
137
|
-
fails "BigDecimal#round raise for a non-existent round mode" # ArgumentError: [BigDecimal#round] wrong number of arguments(2
|
138
|
-
fails "BigDecimal#round uses default rounding method unless given"
|
139
|
-
fails "BigDecimal#sign returns negative value if BigDecimal less than 0"
|
140
|
-
fails "BigDecimal#sign returns positive value if BigDecimal greater than 0"
|
119
|
+
fails "BigDecimal#round :banker rounds values > 5 up, < 5 down and == 5 towards even neighbor" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
120
|
+
fails "BigDecimal#round :ceil rounds values towards +infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
121
|
+
fails "BigDecimal#round :ceiling rounds values towards +infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
122
|
+
fails "BigDecimal#round :default rounds values >= 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
123
|
+
fails "BigDecimal#round :down rounds values towards zero" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
124
|
+
fails "BigDecimal#round :floor rounds values towards -infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
125
|
+
fails "BigDecimal#round :half_down rounds values > 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
126
|
+
fails "BigDecimal#round :half_even rounds values > 5 up, < 5 down and == 5 towards even neighbor" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
127
|
+
fails "BigDecimal#round :half_up rounds values >= 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
128
|
+
fails "BigDecimal#round :truncate rounds values towards zero" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
129
|
+
fails "BigDecimal#round :up rounds values away from zero" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
130
|
+
fails "BigDecimal#round BigDecimal::ROUND_CEILING rounds values towards +infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
131
|
+
fails "BigDecimal#round BigDecimal::ROUND_DOWN rounds values towards zero" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
132
|
+
fails "BigDecimal#round BigDecimal::ROUND_FLOOR rounds values towards -infinity" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
133
|
+
fails "BigDecimal#round BigDecimal::ROUND_HALF_DOWN rounds values > 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
134
|
+
fails "BigDecimal#round BigDecimal::ROUND_HALF_EVEN rounds values > 5 up, < 5 down and == 5 towards even neighbor" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
135
|
+
fails "BigDecimal#round BigDecimal::ROUND_HALF_UP rounds values >= 5 up, otherwise down" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
136
|
+
fails "BigDecimal#round BigDecimal::ROUND_UP rounds values away from zero" # ArgumentError: [BigDecimal#round] wrong number of arguments (given 2, expected -1)
|
137
|
+
fails "BigDecimal#round raise for a non-existent round mode" # Expected ArgumentError (invalid rounding mode) but got: ArgumentError ([BigDecimal#round] wrong number of arguments (given 2, expected -1))
|
138
|
+
fails "BigDecimal#round uses default rounding method unless given" # Expected -1 == -2 to be truthy but was false
|
139
|
+
fails "BigDecimal#sign returns negative value if BigDecimal less than 0" # Expected nil == -2 to be truthy but was false
|
140
|
+
fails "BigDecimal#sign returns positive value if BigDecimal greater than 0" # Expected nil == 2 to be truthy but was false
|
141
141
|
fails "BigDecimal#split first value: -1 for numbers < 0" # NoMethodError: undefined method `split' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
142
142
|
fails "BigDecimal#split first value: 0 if BigDecimal is NaN" # NoMethodError: undefined method `split' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
143
143
|
fails "BigDecimal#split first value: 1 for numbers > 0" # NoMethodError: undefined method `split' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
144
144
|
fails "BigDecimal#split fourth value: the exponent" # NoMethodError: undefined method `split' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
145
145
|
fails "BigDecimal#split second value: a string with the significant digits" # NoMethodError: undefined method `split' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
146
|
-
fails "BigDecimal#split splits BigDecimal in an array with four values"
|
146
|
+
fails "BigDecimal#split splits BigDecimal in an array with four values" # NoMethodError: undefined method `split' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
147
147
|
fails "BigDecimal#split third value: the base (currently always ten)" # NoMethodError: undefined method `split' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
148
|
-
fails "BigDecimal#sqrt raises ArgumentError if 2 arguments are given"
|
149
|
-
fails "BigDecimal#sqrt raises ArgumentError if a negative number is given"
|
150
|
-
fails "BigDecimal#sqrt raises ArgumentError when no argument is given"
|
151
|
-
fails "BigDecimal#sqrt raises FloatDomainError for NaN"
|
152
|
-
fails "BigDecimal#sqrt raises FloatDomainError for negative infinity"
|
153
|
-
fails "BigDecimal#sqrt raises FloatDomainError on negative values"
|
154
|
-
fails "BigDecimal#sqrt raises TypeError if a plain Object is given"
|
155
|
-
fails "BigDecimal#sqrt raises TypeError if a string is given"
|
156
|
-
fails "BigDecimal#sqrt raises TypeError if nil is given"
|
157
|
-
fails "BigDecimal#sqrt returns 0 for 0, +0.0 and -0.0"
|
158
|
-
fails "BigDecimal#sqrt returns 1 if precision is 0 or 1"
|
148
|
+
fails "BigDecimal#sqrt raises ArgumentError if 2 arguments are given" # Expected ArgumentError but got: NoMethodError (undefined method `sqrt' for 1)
|
149
|
+
fails "BigDecimal#sqrt raises ArgumentError if a negative number is given" # Expected ArgumentError but got: NoMethodError (undefined method `sqrt' for 1)
|
150
|
+
fails "BigDecimal#sqrt raises ArgumentError when no argument is given" # Expected ArgumentError but got: NoMethodError (undefined method `sqrt' for 1)
|
151
|
+
fails "BigDecimal#sqrt raises FloatDomainError for NaN" # Expected FloatDomainError but got: NoMethodError (undefined method `sqrt' for NaN)
|
152
|
+
fails "BigDecimal#sqrt raises FloatDomainError for negative infinity" # Expected FloatDomainError but got: NoMethodError (undefined method `sqrt' for -Infinity)
|
153
|
+
fails "BigDecimal#sqrt raises FloatDomainError on negative values" # Expected FloatDomainError but got: NoMethodError (undefined method `sqrt' for -1)
|
154
|
+
fails "BigDecimal#sqrt raises TypeError if a plain Object is given" # Expected TypeError but got: NoMethodError (undefined method `sqrt' for 1)
|
155
|
+
fails "BigDecimal#sqrt raises TypeError if a string is given" # Expected TypeError but got: NoMethodError (undefined method `sqrt' for 1)
|
156
|
+
fails "BigDecimal#sqrt raises TypeError if nil is given" # Expected TypeError but got: NoMethodError (undefined method `sqrt' for 1)
|
157
|
+
fails "BigDecimal#sqrt returns 0 for 0, +0.0 and -0.0" # NoMethodError: undefined method `sqrt' for 0
|
158
|
+
fails "BigDecimal#sqrt returns 1 if precision is 0 or 1" # NoMethodError: undefined method `sqrt' for 1
|
159
159
|
fails "BigDecimal#sqrt returns positive infinity for infinity" # NoMethodError: undefined method `sqrt' for Infinity
|
160
|
-
fails "BigDecimal#sqrt returns square root of 0.9E-99999 with desired precision"
|
161
|
-
fails "BigDecimal#sqrt returns square root of 121 with desired precision"
|
162
|
-
fails "BigDecimal#sqrt returns square root of 2 with desired precision"
|
163
|
-
fails "BigDecimal#sqrt returns square root of 3 with desired precision"
|
160
|
+
fails "BigDecimal#sqrt returns square root of 0.9E-99999 with desired precision" # NoMethodError: undefined method `sqrt' for 9e-100000
|
161
|
+
fails "BigDecimal#sqrt returns square root of 121 with desired precision" # NoMethodError: undefined method `sqrt' for 121
|
162
|
+
fails "BigDecimal#sqrt returns square root of 2 with desired precision" # NoMethodError: undefined method `sqrt' for 2
|
163
|
+
fails "BigDecimal#sqrt returns square root of 3 with desired precision" # NoMethodError: undefined method `sqrt' for 3
|
164
164
|
fails "BigDecimal#sub with Object tries to coerce the other operand to self" # Mock 'Object' expected to receive coerce(123450000000000) exactly 1 times but received it 0 times
|
165
|
-
fails "BigDecimal#sub with Rational produces a BigDecimal" #
|
166
|
-
fails "BigDecimal#to_f properly handles special values"
|
167
|
-
fails "BigDecimal#to_i raises FloatDomainError if BigDecimal is infinity or NaN"
|
165
|
+
fails "BigDecimal#sub with Rational produces a BigDecimal" # TypeError: Rational can't be coerced into BigDecimal
|
166
|
+
fails "BigDecimal#to_f properly handles special values" # Expected "0" == "0.0" to be truthy but was false
|
167
|
+
fails "BigDecimal#to_i raises FloatDomainError if BigDecimal is infinity or NaN" # Expected FloatDomainError but got: NoMethodError (undefined method `to_i' for Infinity)
|
168
168
|
fails "BigDecimal#to_i returns Integer otherwise" # NoMethodError: undefined method `to_i' for 3e-20001
|
169
|
-
fails "BigDecimal#to_int raises FloatDomainError if BigDecimal is infinity or NaN"
|
169
|
+
fails "BigDecimal#to_int raises FloatDomainError if BigDecimal is infinity or NaN" # Expected FloatDomainError but got: NoMethodError (undefined method `to_i' for Infinity)
|
170
170
|
fails "BigDecimal#to_int returns Integer otherwise" # NoMethodError: undefined method `to_i' for 3e-20001
|
171
|
+
fails "BigDecimal#to_r returns a Rational from a BigDecimal with an exponent" # NoMethodError: undefined method `to_r' for 100
|
172
|
+
fails "BigDecimal#to_r returns a Rational from a negative BigDecimal with an exponent" # NoMethodError: undefined method `to_r' for -100
|
171
173
|
fails "BigDecimal#to_r returns a Rational with bignum values" # NoMethodError: undefined method `to_r' for 3.141592653589793238462643
|
172
174
|
fails "BigDecimal#to_r returns a Rational" # NoMethodError: undefined method `to_r' for 3.14159
|
173
|
-
fails "BigDecimal#to_s can return a leading space for values > 0"
|
174
|
-
fails "BigDecimal#to_s can use conventional floating point notation"
|
175
|
-
fails "BigDecimal#to_s can use engineering notation"
|
176
|
-
fails "BigDecimal#to_s does not add an exponent for zero values" #
|
177
|
-
fails "BigDecimal#to_s inserts a space every n chars, if integer n is supplied"
|
178
|
-
fails "BigDecimal#to_s removes trailing spaces in floating point notation"
|
179
|
-
fails "BigDecimal#to_s return type is of class String" #
|
175
|
+
fails "BigDecimal#to_s can return a leading space for values > 0" # NoMethodError: undefined method `default_internal' for Encoding
|
176
|
+
fails "BigDecimal#to_s can use conventional floating point notation" # NoMethodError: undefined method `default_internal' for Encoding
|
177
|
+
fails "BigDecimal#to_s can use engineering notation" # NoMethodError: undefined method `default_internal' for Encoding
|
178
|
+
fails "BigDecimal#to_s does not add an exponent for zero values" # NoMethodError: undefined method `default_internal' for Encoding
|
179
|
+
fails "BigDecimal#to_s inserts a space every n chars, if integer n is supplied" # NoMethodError: undefined method `default_internal' for Encoding
|
180
|
+
fails "BigDecimal#to_s removes trailing spaces in floating point notation" # NoMethodError: undefined method `default_internal' for Encoding
|
181
|
+
fails "BigDecimal#to_s return type is of class String" # NoMethodError: undefined method `default_internal' for Encoding
|
180
182
|
fails "BigDecimal#to_s returns a String in US-ASCII encoding when Encoding.default_internal is nil" # NoMethodError: undefined method `default_internal' for Encoding
|
181
183
|
fails "BigDecimal#to_s returns a String in US-ASCII encoding when Encoding.default_internal is not nil" # NoMethodError: undefined method `default_internal' for Encoding
|
182
|
-
fails "BigDecimal#to_s starts with + if + is supplied and value is positive"
|
183
|
-
fails "BigDecimal#to_s takes an optional argument" #
|
184
|
-
fails "BigDecimal#to_s the default format looks like 0.xxxxenn" #
|
185
|
-
fails "BigDecimal#truncate returns Infinity if self is infinite"
|
186
|
-
fails "BigDecimal#truncate returns the same value if self is special value"
|
187
|
-
fails "BigDecimal#truncate returns value of given precision otherwise"
|
188
|
-
fails "BigDecimal.double_fig returns the number of digits a Float number is allowed to have"
|
189
|
-
fails "BigDecimal.limit picks the global precision when limit 0 specified" # Expected 0.8888
|
190
|
-
fails "BigDecimal.limit picks the specified precision over global limit" # Expected 0.888
|
191
|
-
fails "BigDecimal.limit returns the value before set if the passed argument is nil or is not specified"
|
192
|
-
fails "BigDecimal.limit uses the global limit if no precision is specified" # Expected 0.888
|
193
|
-
fails "BigDecimal.mode raise an exception if the flag is true"
|
194
|
-
fails "BigDecimal.mode returns Infinity when too big"
|
195
|
-
fails "BigDecimal.mode returns the appropriate value and continue the computation if the flag is false"
|
196
|
-
fails "Float#to_d returns appropriate BigDecimal zero for signed zero" # NoMethodError: undefined method `to_d' for 0
|
184
|
+
fails "BigDecimal#to_s starts with + if + is supplied and value is positive" # NoMethodError: undefined method `default_internal' for Encoding
|
185
|
+
fails "BigDecimal#to_s takes an optional argument" # NoMethodError: undefined method `default_internal' for Encoding
|
186
|
+
fails "BigDecimal#to_s the default format looks like 0.xxxxenn" # NoMethodError: undefined method `default_internal' for Encoding
|
187
|
+
fails "BigDecimal#truncate returns Infinity if self is infinite" # Expected NaN == Infinity to be truthy but was false
|
188
|
+
fails "BigDecimal#truncate returns the same value if self is special value" # Expected FloatDomainError but no exception was raised (NaN was returned)
|
189
|
+
fails "BigDecimal#truncate returns value of given precision otherwise" # Expected 3e-100 == 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 to be truthy but was false
|
190
|
+
fails "BigDecimal.double_fig returns the number of digits a Float number is allowed to have" # NoMethodError: undefined method `double_fig' for BigDecimal
|
191
|
+
fails "BigDecimal.limit picks the global precision when limit 0 specified" # Expected 0.8888 == 0.889 to be truthy but was false
|
192
|
+
fails "BigDecimal.limit picks the specified precision over global limit" # Expected 0.888 == 0.89 to be truthy but was false
|
193
|
+
fails "BigDecimal.limit returns the value before set if the passed argument is nil or is not specified" # Expected 1 == 0 to be truthy but was false
|
194
|
+
fails "BigDecimal.limit uses the global limit if no precision is specified" # Expected 0.888 == 0.9 to be truthy but was false
|
195
|
+
fails "BigDecimal.mode raise an exception if the flag is true" # NameError: uninitialized constant BigDecimal::EXCEPTION_NaN
|
196
|
+
fails "BigDecimal.mode returns Infinity when too big" # NameError: uninitialized constant BigDecimal::EXCEPTION_NaN
|
197
|
+
fails "BigDecimal.mode returns the appropriate value and continue the computation if the flag is false" # NameError: uninitialized constant BigDecimal::EXCEPTION_NaN
|
198
|
+
fails "Float#to_d returns appropriate BigDecimal zero for signed zero" # NoMethodError: undefined method `to_d' for -0.0
|
197
199
|
fails "Kernel#BigDecimal BigDecimal(Rational) with bigger-than-double numerator" # Expected 1000000000000000000 > 18446744073709552000 to be truthy but was false
|
198
200
|
fails "Kernel#BigDecimal accepts significant digits >= given precision" # NoMethodError: undefined method `precs' for 3.1415923
|
199
201
|
fails "Kernel#BigDecimal allows for [eEdD] as exponent separator" # Exception: new BigNumber() not a number: 12345.67d89
|
200
|
-
fails "Kernel#BigDecimal coerces the value argument with #to_str" # Exception: new BigNumber() not a number: #<MockObject:
|
201
|
-
fails "Kernel#BigDecimal creates a new object of class BigDecimal" # Expected 1
|
202
|
+
fails "Kernel#BigDecimal coerces the value argument with #to_str" # Exception: new BigNumber() not a number: #<MockObject:0xe952>
|
203
|
+
fails "Kernel#BigDecimal creates a new object of class BigDecimal" # Expected 1 == (1/1) to be truthy but was false
|
202
204
|
fails "Kernel#BigDecimal determines precision from initial value" # NoMethodError: undefined method `precs' for 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593014782083152134043
|
203
205
|
fails "Kernel#BigDecimal does not call to_s when calling inspect" # Expected "44.44" == "0.4444e2" to be truthy but was false
|
204
206
|
fails "Kernel#BigDecimal does not ignores trailing garbage" # Expected ArgumentError but got: Exception (new BigNumber() not a number: 123E45ruby)
|
205
207
|
fails "Kernel#BigDecimal pre-coerces long integers" # Expected 262000 == 1130000000000000 to be truthy but was false
|
206
208
|
fails "Kernel#BigDecimal process underscores as Float()" # Exception: new BigNumber() not a number: 12_345.67E89
|
207
|
-
fails "Kernel#BigDecimal raises ArgumentError for invalid strings" #
|
209
|
+
fails "Kernel#BigDecimal raises ArgumentError for invalid strings" # Expected ArgumentError but got: Exception (new BigNumber() not a number: ruby)
|
208
210
|
fails "Kernel#BigDecimal raises ArgumentError when Float is used without precision" # Expected ArgumentError but no exception was raised (1 was returned)
|
209
211
|
fails "Kernel#BigDecimal when interacting with Rational BigDecimal maximum precision is nine more than precision except for abnormals" # TypeError: Rational can't be coerced into BigDecimal
|
210
212
|
fails "Kernel#BigDecimal when interacting with Rational BigDecimal precision is the number of digits rounded up to a multiple of nine" # TypeError: Rational can't be coerced into BigDecimal
|
@@ -219,6 +221,5 @@ opal_filter "BigDecimal" do
|
|
219
221
|
fails "Kernel#BigDecimal when interacting with Rational produces the expected result when done via Float" # TypeError: Rational can't be coerced into BigDecimal
|
220
222
|
fails "Kernel#BigDecimal when interacting with Rational produces the expected result when done via to_f" # TypeError: Rational can't be coerced into BigDecimal
|
221
223
|
fails "Kernel#BigDecimal when interacting with Rational produces the expected result" # TypeError: Rational can't be coerced into BigDecimal
|
222
|
-
fails "Kernel#BigDecimal with exception: false returns nil for invalid strings" # Exception: new BigNumber() not a number: invalid
|
223
|
-
fails "Kernel#Pathname is a private instance method" # Expected Kernel to have private instance method 'Pathname' but it does not
|
224
|
+
fails "Kernel#BigDecimal with exception: false returns nil for invalid strings" # Exception: new BigNumber() not a number: invalid
|
224
225
|
end
|
@@ -1,26 +1,26 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Binding" do
|
3
|
-
fails "Binding#clone is a shallow copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:
|
4
|
-
fails "Binding#clone returns a copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:
|
5
|
-
fails "Binding#dup is a shallow copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:
|
6
|
-
fails "Binding#dup returns a copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:
|
7
|
-
fails "Binding#eval behaves like Kernel.eval(..., self)" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:
|
3
|
+
fails "Binding#clone is a shallow copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:0x3aa86 @secret=99>
|
4
|
+
fails "Binding#clone returns a copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:0x3ac2e @secret=99>
|
5
|
+
fails "Binding#dup is a shallow copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:0x336ac @secret=99>
|
6
|
+
fails "Binding#dup returns a copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:0x33854 @secret=99>
|
7
|
+
fails "Binding#eval behaves like Kernel.eval(..., self)" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:0x4e62 @secret=10>
|
8
8
|
fails "Binding#eval does not leak variables to cloned bindings" # Expected [] == ["x"] to be truthy but was false
|
9
|
-
fails "Binding#eval reflects refinements activated in the binding scope" #
|
9
|
+
fails "Binding#eval reflects refinements activated in the binding scope" # NoMethodError: undefined method `foo' for "bar"
|
10
10
|
fails "Binding#eval starts with a __LINE__ from the third argument if passed" # Expected 1 == 88 to be truthy but was false
|
11
11
|
fails "Binding#eval starts with line 1 if the Binding is created with #send" # RuntimeError: Opal doesn't support dynamic calls to binding
|
12
12
|
fails "Binding#eval with __method__ returns the method where the Binding was created" # Expected nil == "get_binding_and_method" to be truthy but was false
|
13
|
-
fails "Binding#eval with __method__ returns the method where the Binding was created, ignoring #send" #
|
13
|
+
fails "Binding#eval with __method__ returns the method where the Binding was created, ignoring #send" # RuntimeError: Opal doesn't support dynamic calls to binding
|
14
14
|
fails "Binding#irb creates an IRB session with the binding in scope" # NoMethodError: undefined method `popen' for IO
|
15
15
|
fails "Binding#local_variable_defined? allows usage of an object responding to #to_str as the variable name" # Expected false == true to be truthy but was false
|
16
16
|
fails "Binding#local_variable_defined? returns true when a local variable is defined using Binding#local_variable_set" # Expected false == true to be truthy but was false
|
17
17
|
fails "Binding#local_variable_defined? returns true when a local variable is defined using eval()" # Expected false == true to be truthy but was false
|
18
|
-
fails "Binding#local_variable_get gets a local variable defined using eval()" #
|
19
|
-
fails "Binding#local_variable_set adds nonexistent variables to the binding's eval scope" #
|
18
|
+
fails "Binding#local_variable_get gets a local variable defined using eval()" # NameError: local variable `number' is not defined for #<Binding:0x47730 @jseval=#<Proc:0x47806> @scope_variables=["bind"] @receiver=#<MSpecEnv:0x4770a> @source_location=["ruby/core/binding/local_variable_get_spec.rb", 40]>
|
19
|
+
fails "Binding#local_variable_set adds nonexistent variables to the binding's eval scope" # Expected [] == ["foo"] to be truthy but was false
|
20
20
|
fails "Binding#local_variable_set raises a NameError on global access" # Expected NameError but no exception was raised ("" was returned)
|
21
21
|
fails "Binding#local_variable_set raises a NameError on special variable access" # Expected NameError but got: Exception (Unexpected token '~')
|
22
22
|
fails "Binding#local_variable_set sets a local variable using an object responding to #to_str as the variable name" # Exception: Invalid or unexpected token
|
23
23
|
fails "Binding#local_variables includes local variables defined after calling binding.local_variables" # Expected [] == ["a", "b"] to be truthy but was false
|
24
24
|
fails "Binding#local_variables includes local variables of inherited scopes and eval'ed context" # Expected ["c"] == ["c", "a", "b", "p"] to be truthy but was false
|
25
|
-
fails "Binding#local_variables includes new variables defined in the binding" # Expected ["b"] == ["a", "b"] to be truthy but was false
|
25
|
+
fails "Binding#local_variables includes new variables defined in the binding" # Expected ["b"] == ["a", "b"] to be truthy but was false
|
26
26
|
end
|
data/spec/filters/bugs/class.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Class" do
|
3
|
-
fails "Class#allocate raises TypeError for #superclass"
|
4
|
-
fails "Class#dup duplicates both the class and the singleton class"
|
5
|
-
fails "Class#dup retains an included module in the ancestor chain for the singleton class"
|
6
|
-
fails "Class#dup retains the correct ancestor chain for the singleton class"
|
7
|
-
fails "Class#initialize raises a TypeError when called on BasicObject"
|
8
|
-
fails "Class#initialize raises a TypeError when called on already initialized classes"
|
9
|
-
fails "Class#initialize when given the Class raises a TypeError"
|
3
|
+
fails "Class#allocate raises TypeError for #superclass" # Expected TypeError but no exception was raised (nil was returned)
|
4
|
+
fails "Class#dup duplicates both the class and the singleton class" # Exception: self.$$constructor is not a constructor
|
5
|
+
fails "Class#dup retains an included module in the ancestor chain for the singleton class" # NoMethodError: undefined method `hello' for #<Module:0x402e6>
|
6
|
+
fails "Class#dup retains the correct ancestor chain for the singleton class" # Exception: self.$$constructor is not a constructor
|
7
|
+
fails "Class#initialize raises a TypeError when called on BasicObject" # Expected TypeError but no exception was raised (nil was returned)
|
8
|
+
fails "Class#initialize raises a TypeError when called on already initialized classes" # Expected TypeError but no exception was raised (nil was returned)
|
9
|
+
fails "Class#initialize when given the Class raises a TypeError" # Expected TypeError but got: ArgumentError ([.initialize] wrong number of arguments (given 1, expected 0))
|
10
10
|
fails "Class#new uses the internal allocator and does not call #allocate" # RuntimeError: allocate should not be called
|
11
|
-
fails "Class.new raises a TypeError if passed a metaclass"
|
11
|
+
fails "Class.new raises a TypeError if passed a metaclass" # Expected TypeError but no exception was raised (#<Class:0x34cae> was returned)
|
12
12
|
fails_badly "Class#descendants returns a list of classes descended from self (excluding self)" # GC/Spec order issue. Expected [#<Class:0x2e77c>, #<Class:0x2e79a>, #<Class:0x37368>, ModuleSpecs::Child, ModuleSpecs::Child2, ModuleSpecs::Grandchild] == [ModuleSpecs::Child, ModuleSpecs::Child2, ModuleSpecs::Grandchild] to be truthy but was false
|
13
13
|
fails_badly "Class#subclasses returns a list of classes directly inheriting from self" # GC/Spec order issue. Expected [#<Class:0x2e77c>, #<Class:0x2e79a>, #<Class:0x37368>, ModuleSpecs::Child, ModuleSpecs::Child2] == [ModuleSpecs::Child, ModuleSpecs::Child2] to be truthy but was false
|
14
14
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Complex" do
|
3
3
|
fails "Complex#<=> returns 0, 1, or -1 if self and argument do not have imaginary part" # Expected nil == 1 to be truthy but was false
|
4
|
-
fails "Complex#coerce returns an array containing other as Complex and self when other is a Numeric which responds to #real? with true"
|
4
|
+
fails "Complex#coerce returns an array containing other as Complex and self when other is a Numeric which responds to #real? with true" # Expected (#<NumericMockObject:0x1574c @name="other" @null=nil>+0i) to have same value and type as (#<NumericMockObject:0x1574c @name="other" @null=nil>+0i)
|
5
5
|
fails "Complex#to_c returns self" # Expected ((1+5i)+0i) to be identical to (1+5i)
|
6
6
|
fails "Complex#to_c returns the same value" # Expected ((1+5i)+0i) == (1+5i) to be truthy but was false
|
7
|
+
fails "Complex.polar computes the real values of the real & imaginary parts from the polar form" # TypeError: not a real
|
7
8
|
end
|