opal 1.6.1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/spec/filters/bugs/file.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "File" do
|
3
|
-
fails "File.absolute_path accepts a second argument of a directory from which to resolve the path" # Expected "./ruby/core/file/ruby/core/file/absolute_path_spec.rb"
|
4
|
-
fails "File.absolute_path does not expand '~user' to a home directory." # Expected "./ruby/core/file/~user"
|
5
|
-
fails "File.absolute_path resolves paths relative to the current working directory" # Expected "./ruby/core/file/hello.txt"
|
3
|
+
fails "File.absolute_path accepts a second argument of a directory from which to resolve the path" # Expected "./ruby/core/file/ruby/core/file/absolute_path_spec.rb" == "ruby/core/file/absolute_path_spec.rb" to be truthy but was false
|
4
|
+
fails "File.absolute_path does not expand '~user' to a home directory." # Expected "./ruby/core/file/~user" == "ruby/core/file/~user" to be truthy but was false
|
5
|
+
fails "File.absolute_path resolves paths relative to the current working directory" # Expected "./ruby/core/file/hello.txt" == "ruby/core/file/hello.txt" to be truthy but was false
|
6
6
|
fails "File.absolute_path? calls #to_path on its argument" # Mock 'path' expected to receive to_path("any_args") exactly 1 times but received it 0 times
|
7
7
|
fails "File.absolute_path? does not expand '~' to a home directory." # NoMethodError: undefined method `absolute_path?' for File
|
8
8
|
fails "File.absolute_path? does not expand '~user' to a home directory." # NoMethodError: undefined method `absolute_path?' for File
|
@@ -10,37 +10,37 @@ opal_filter "File" do
|
|
10
10
|
fails "File.absolute_path? returns false if it's a tricky relative path" # NoMethodError: undefined method `absolute_path?' for File
|
11
11
|
fails "File.absolute_path? returns true if it's an absolute pathname" # NoMethodError: undefined method `absolute_path?' for File
|
12
12
|
fails "File.absolute_path? takes into consideration the platform's root" # NoMethodError: undefined method `absolute_path?' for File
|
13
|
-
fails "File.expand_path accepts objects that have a #to_path method" #
|
14
|
-
fails "File.expand_path converts a pathname to an absolute pathname" #
|
15
|
-
fails "File.expand_path converts a pathname to an absolute pathname, Ruby-Talk:18512" #
|
16
|
-
fails "File.expand_path converts a pathname to an absolute pathname, using a complete path" #
|
17
|
-
fails "File.expand_path does not expand ~ENV['USER'] when it's not at the start" # ArgumentError: [Dir.home] wrong number of arguments(1
|
18
|
-
fails "File.expand_path does not modify a HOME string argument" # ArgumentError: [Dir.home] wrong number of arguments(1
|
19
|
-
fails "File.expand_path does not modify the string argument" #
|
20
|
-
fails "File.expand_path does not replace multiple '/' at the beginning of the path" # ArgumentError: [Dir.home] wrong number of arguments(1
|
21
|
-
fails "File.expand_path expand path with" # ArgumentError: [Dir.home] wrong number of arguments(1
|
22
|
-
fails "File.expand_path expand_path for common unix path gives a full path" # ArgumentError: [Dir.home] wrong number of arguments(1
|
23
|
-
fails "File.expand_path expands ../foo with ~/dir as base dir to /path/to/user/home/foo" # ArgumentError: [Dir.home] wrong number of arguments(1
|
24
|
-
fails "File.expand_path expands /./dir to /dir" # ArgumentError: [Dir.home] wrong number of arguments(1
|
25
|
-
fails "File.expand_path expands a path when the default external encoding is BINARY" # ArgumentError: [Dir.home] wrong number of arguments(1
|
26
|
-
fails "File.expand_path expands a path with multi-byte characters" #
|
27
|
-
fails "File.expand_path expands ~ENV['USER'] to the user's home directory" #
|
28
|
-
fails "File.expand_path expands ~ENV['USER']/a to a in the user's home directory" # ArgumentError: [Dir.home] wrong number of arguments(1
|
29
|
-
fails "File.expand_path keeps trailing dots on absolute pathname" # ArgumentError: [Dir.home] wrong number of arguments(1
|
30
|
-
fails "File.expand_path raises a TypeError if not passed a String type" #
|
31
|
-
fails "File.expand_path raises an ArgumentError if the path is not valid" #
|
32
|
-
fails "File.expand_path raises an Encoding::CompatibilityError if the external encoding is not compatible" # ArgumentError: [Dir.home] wrong number of arguments(1
|
33
|
-
fails "File.expand_path replaces multiple '/' with a single '/'" # ArgumentError: [Dir.home] wrong number of arguments(1
|
34
|
-
fails "File.expand_path returns a String in the same encoding as the argument" #
|
35
|
-
fails "File.expand_path returns a String when passed a String subclass" #
|
13
|
+
fails "File.expand_path accepts objects that have a #to_path method" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
14
|
+
fails "File.expand_path converts a pathname to an absolute pathname" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
15
|
+
fails "File.expand_path converts a pathname to an absolute pathname, Ruby-Talk:18512" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
16
|
+
fails "File.expand_path converts a pathname to an absolute pathname, using a complete path" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
17
|
+
fails "File.expand_path does not expand ~ENV['USER'] when it's not at the start" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
18
|
+
fails "File.expand_path does not modify a HOME string argument" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
19
|
+
fails "File.expand_path does not modify the string argument" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
20
|
+
fails "File.expand_path does not replace multiple '/' at the beginning of the path" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
21
|
+
fails "File.expand_path expand path with" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
22
|
+
fails "File.expand_path expand_path for common unix path gives a full path" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
23
|
+
fails "File.expand_path expands ../foo with ~/dir as base dir to /path/to/user/home/foo" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
24
|
+
fails "File.expand_path expands /./dir to /dir" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
25
|
+
fails "File.expand_path expands a path when the default external encoding is BINARY" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
26
|
+
fails "File.expand_path expands a path with multi-byte characters" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
27
|
+
fails "File.expand_path expands ~ENV['USER'] to the user's home directory" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
28
|
+
fails "File.expand_path expands ~ENV['USER']/a to a in the user's home directory" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
29
|
+
fails "File.expand_path keeps trailing dots on absolute pathname" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
30
|
+
fails "File.expand_path raises a TypeError if not passed a String type" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
31
|
+
fails "File.expand_path raises an ArgumentError if the path is not valid" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
32
|
+
fails "File.expand_path raises an Encoding::CompatibilityError if the external encoding is not compatible" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
33
|
+
fails "File.expand_path replaces multiple '/' with a single '/'" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
34
|
+
fails "File.expand_path returns a String in the same encoding as the argument" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
35
|
+
fails "File.expand_path returns a String when passed a String subclass" # ArgumentError: [Dir.home] wrong number of arguments (given 1, expected 0)
|
36
36
|
fails "File.expand_path when HOME is not set raises an ArgumentError when passed '~' if HOME == ''" # Expected ArgumentError but no exception was raised ("/" was returned)
|
37
37
|
fails "File.expand_path with a non-absolute HOME raises an ArgumentError" # Expected ArgumentError (non-absolute home) but no exception was raised ("non-absolute" was returned)
|
38
38
|
fails "File.extname for a filename ending with a dot returns '.'" # Expected "" == "." to be truthy but was false
|
39
|
-
fails "File.join calls #to_path"
|
40
|
-
fails "File.join calls #to_str"
|
41
|
-
fails "File.join inserts the separator in between empty strings and arrays"
|
42
|
-
fails "File.join raises a TypeError exception when args are nil"
|
43
|
-
fails "File.join raises an ArgumentError if passed a recursive array"
|
39
|
+
fails "File.join calls #to_path" # Expected TypeError but got: NoMethodError (undefined method `empty?' for #<MockObject:0x32afc @name="x" @null=nil>)
|
40
|
+
fails "File.join calls #to_str" # Expected TypeError but got: NoMethodError (undefined method `empty?' for #<MockObject:0x32af2 @name="x" @null=nil>)
|
41
|
+
fails "File.join inserts the separator in between empty strings and arrays" # Expected "/" == "" to be truthy but was false
|
42
|
+
fails "File.join raises a TypeError exception when args are nil" # Expected TypeError but got: NoMethodError (undefined method `empty?' for nil)
|
43
|
+
fails "File.join raises an ArgumentError if passed a recursive array" # Expected ArgumentError but got: Exception (Maximum call stack size exceeded)
|
44
44
|
fails "File.join raises errors for null bytes" # Expected ArgumentError but no exception was raised ("\u0000x/metadata.gz" was returned)
|
45
|
-
fails "File.join returns a duplicate string when given a single argument"
|
45
|
+
fails "File.join returns a duplicate string when given a single argument" # Expected "usr" not to be identical to "usr"
|
46
46
|
end
|
data/spec/filters/bugs/float.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Float" do
|
3
|
-
fails "Float constant MAX is 1.7976931348623157e+308"
|
4
|
-
fails "Float constant MIN is 2.2250738585072014e-308"
|
3
|
+
fails "Float constant MAX is 1.7976931348623157e+308" # Exception: Maximum call stack size exceeded
|
4
|
+
fails "Float constant MIN is 2.2250738585072014e-308" # Expected 5e-324 == (1/4.49423283715579e+307) to be truthy but was false
|
5
5
|
fails "Float#<=> raises TypeError when #coerce misbehaves" # Expected TypeError (coerce must return [x, y]) but no exception was raised (nil was returned)
|
6
6
|
fails "Float#<=> returns 0 when self is Infinity and other other is infinite?=1" # Expected nil == 0 to be truthy but was false
|
7
7
|
fails "Float#<=> returns 1 when self is Infinity and other is infinite?=-1" # Expected nil == 1 to be truthy but was false
|
8
8
|
fails "Float#<=> returns 1 when self is Infinity and other is infinite?=nil (which means finite)" # Expected nil == 1 to be truthy but was false
|
9
|
-
fails "Float#divmod returns an [quotient, modulus] from dividing self by other" #
|
9
|
+
fails "Float#divmod returns an [quotient, modulus] from dividing self by other" # Expected 0 to be within 18446744073709552000 +/- 0.00004
|
10
10
|
fails "Float#inspect emits a trailing '.0' for a whole number" # Expected "50" == "50.0" to be truthy but was false
|
11
11
|
fails "Float#inspect emits a trailing '.0' for the mantissa in e format" # Expected "100000000000000000000" == "1.0e+20" to be truthy but was false
|
12
12
|
fails "Float#inspect encoding returns a String in US-ASCII encoding when Encoding.default_internal is nil" # NoMethodError: undefined method `default_internal' for Encoding
|
@@ -26,28 +26,33 @@ opal_filter "Float" do
|
|
26
26
|
fails "Float#inspect uses non-e format for a positive value with whole part having 15 significant figures" # Expected "10000000000000" == "10000000000000.0" to be truthy but was false
|
27
27
|
fails "Float#inspect uses non-e format for a positive value with whole part having 16 significant figures" # Expected "100000000000000" == "100000000000000.0" to be truthy but was false
|
28
28
|
fails "Float#negative? on negative zero returns false" # Expected true to be false
|
29
|
-
fails "Float#rationalize returns self as a simplified Rational with no argument" #
|
30
|
-
fails "Float#round
|
31
|
-
fails "Float#round
|
29
|
+
fails "Float#rationalize returns self as a simplified Rational with no argument" # Expected (3547048656689661/1048576) == (4806858197361/1421) to be truthy but was false
|
30
|
+
fails "Float#round does not lose precision during the rounding process" # ArgumentError: [Number#round] wrong number of arguments (given 2, expected -1)
|
31
|
+
fails "Float#round preserves cases where neighbouring floating pointer number increase the decimal places" # ArgumentError: [Number#round] wrong number of arguments (given 2, expected -1)
|
32
|
+
fails "Float#round raise for a non-existent round mode" # Expected ArgumentError (invalid rounding mode: nonsense) but got: TypeError (no implicit conversion of Hash into Integer)
|
33
|
+
fails "Float#round raises FloatDomainError for exceptional values with a half option" # Expected FloatDomainError but got: TypeError (no implicit conversion of Hash into Integer)
|
32
34
|
fails "Float#round returns big values rounded to nearest" # Expected 0 to have same value and type as 300000000000000000000
|
33
35
|
fails "Float#round returns different rounded values depending on the half option" # TypeError: no implicit conversion of Hash into Integer
|
34
|
-
fails "Float#round rounds self to an optionally given precision with a half option" # ArgumentError: [Number#round] wrong number of arguments(2
|
36
|
+
fails "Float#round rounds self to an optionally given precision with a half option" # ArgumentError: [Number#round] wrong number of arguments (given 2, expected -1)
|
35
37
|
fails "Float#round when 0.0 is given returns 0 for 0 or undefined ndigits" # TypeError: no implicit conversion of Hash into Integer
|
36
38
|
fails "Float#round when 0.0 is given returns self for positive ndigits" # Expected "0" == "0.0" to be truthy but was false
|
39
|
+
fails "Float#to_i raises a FloatDomainError for NaN" # Expected FloatDomainError but no exception was raised (NaN was returned)
|
40
|
+
fails "Float#to_int raises a FloatDomainError for NaN" # Expected FloatDomainError but no exception was raised (NaN was returned)
|
37
41
|
fails "Float#to_s encoding returns a String in US-ASCII encoding when Encoding.default_internal is nil" # NoMethodError: undefined method `default_internal' for Encoding
|
38
42
|
fails "Float#to_s encoding returns a String in US-ASCII encoding when Encoding.default_internal is not nil" # NoMethodError: undefined method `default_internal' for Encoding
|
39
|
-
fails "Float#to_s matches random examples in all ranges" # Expected "4.9247416523566613e-8"
|
40
|
-
fails "Float#to_s matches random examples in human ranges" # Expected "174"
|
41
|
-
fails "Float#to_s matches random values from divisions" # Expected "0"
|
42
|
-
fails "Float#to_s uses e format for a negative value with fractional part having 6 significant figures"
|
43
|
-
fails "Float#to_s uses e format for a negative value with whole part having 17 significant figures" # Expected "-1000000000000000"
|
44
|
-
fails "Float#to_s uses e format for a negative value with whole part having 18 significant figures"
|
45
|
-
fails "Float#to_s uses e format for a positive value with fractional part having 6 significant figures"
|
46
|
-
fails "Float#to_s uses e format for a positive value with whole part having 17 significant figures" # Expected "1000000000000000"
|
47
|
-
fails "Float#to_s uses e format for a positive value with whole part having 18 significant figures"
|
48
|
-
fails "Float#to_s uses non-e format for a negative value with whole part having 15 significant figures"
|
49
|
-
fails "Float#to_s uses non-e format for a negative value with whole part having 16 significant figures"
|
50
|
-
fails "Float#to_s uses non-e format for a positive value with whole part having 15 significant figures"
|
51
|
-
fails "Float#to_s uses non-e format for a positive value with whole part having 16 significant figures"
|
52
|
-
fails "Float#truncate
|
43
|
+
fails "Float#to_s matches random examples in all ranges" # Expected "4.9247416523566613e-8" == "4.9247416523566613e-08" to be truthy but was false
|
44
|
+
fails "Float#to_s matches random examples in human ranges" # Expected "174" == "174.0" to be truthy but was false
|
45
|
+
fails "Float#to_s matches random values from divisions" # Expected "0" == "0.0" to be truthy but was false
|
46
|
+
fails "Float#to_s uses e format for a negative value with fractional part having 6 significant figures" # Expected "-0.00001" == "-1.0e-05" to be truthy but was false
|
47
|
+
fails "Float#to_s uses e format for a negative value with whole part having 17 significant figures" # Expected "-1000000000000000" == "-1.0e+15" to be truthy but was false
|
48
|
+
fails "Float#to_s uses e format for a negative value with whole part having 18 significant figures" # Expected "-10000000000000000" == "-1.0e+16" to be truthy but was false
|
49
|
+
fails "Float#to_s uses e format for a positive value with fractional part having 6 significant figures" # Expected "0.00001" == "1.0e-05" to be truthy but was false
|
50
|
+
fails "Float#to_s uses e format for a positive value with whole part having 17 significant figures" # Expected "1000000000000000" == "1.0e+15" to be truthy but was false
|
51
|
+
fails "Float#to_s uses e format for a positive value with whole part having 18 significant figures" # Expected "10000000000000000" == "1.0e+16" to be truthy but was false
|
52
|
+
fails "Float#to_s uses non-e format for a negative value with whole part having 15 significant figures" # Expected "-10000000000000" == "-10000000000000.0" to be truthy but was false
|
53
|
+
fails "Float#to_s uses non-e format for a negative value with whole part having 16 significant figures" # Expected "-100000000000000" == "-100000000000000.0" to be truthy but was false
|
54
|
+
fails "Float#to_s uses non-e format for a positive value with whole part having 15 significant figures" # Expected "10000000000000" == "10000000000000.0" to be truthy but was false
|
55
|
+
fails "Float#to_s uses non-e format for a positive value with whole part having 16 significant figures" # Expected "100000000000000" == "100000000000000.0" to be truthy but was false
|
56
|
+
fails "Float#truncate raises a FloatDomainError for NaN" # Expected FloatDomainError but no exception was raised (NaN was returned)
|
57
|
+
fails "Float#truncate returns self truncated to an Integer" # Expected -1 to have same value and type as 0
|
53
58
|
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_unsupported_filter "freezing" do
|
3
|
+
fails "Date constants freezes MONTHNAMES, DAYNAMES, ABBR_MONTHNAMES, ABBR_DAYSNAMES" # Expected FrozenError (/frozen/) but no exception was raised ([nil, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "Unknown"] was returned)
|
4
|
+
fails "FalseClass#to_s returns a frozen string" # Expected "false".frozen? to be truthy but was false
|
5
|
+
fails "File.basename returns a new unfrozen String" # Expected "foo.rb" not to be identical to "foo.rb"
|
6
|
+
fails "FrozenError#receiver should return frozen object that modification was attempted on" # Expected #<Class:#<Object:0xa315c>> to be identical to #<Object:0xa315c>
|
7
|
+
fails "Hash literal does not change encoding of literal string keys during creation" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false
|
8
|
+
fails "Hash literal freezes string keys on initialization" # NotImplementedError: String#reverse! not supported. Mutable String methods are not supported in Opal.
|
9
|
+
fails "Kernel#clone with freeze: anything else raises ArgumentError when passed not true/false/nil" # Expected ArgumentError (/unexpected value for freeze: Integer/) but got: ArgumentError (unexpected value for freeze: Number)
|
10
|
+
fails "Kernel#clone with freeze: false calls #initialize_clone with kwargs freeze: false even if #initialize_clone only takes a single argument" # Expected ArgumentError (wrong number of arguments (given 2, expected 1)) but got: ArgumentError ([Clone#initialize_clone] wrong number of arguments (given 2, expected 1))
|
11
|
+
fails "Kernel#clone with freeze: true calls #initialize_clone with kwargs freeze: true even if #initialize_clone only takes a single argument" # Expected ArgumentError (wrong number of arguments (given 2, expected 1)) but got: ArgumentError ([Clone#initialize_clone] wrong number of arguments (given 2, expected 1))
|
12
|
+
fails "Kernel#freeze causes mutative calls to raise RuntimeError" # Expected RuntimeError but no exception was raised (1 was returned)
|
13
|
+
fails "Kernel#freeze on a Symbol has no effect since it is already frozen" # Expected false to be true
|
14
|
+
fails "Kernel#frozen? on a Symbol returns true" # Expected false to be true
|
15
|
+
fails "Literal Regexps is frozen" # Expected /Hello/.frozen? to be truthy but was false
|
16
|
+
fails "Marshal.load when called with freeze: true does not freeze classes" # ArgumentError: [Marshal.load] wrong number of arguments (given 2, expected 1)
|
17
|
+
fails "Marshal.load when called with freeze: true does not freeze modules" # ArgumentError: [Marshal.load] wrong number of arguments (given 2, expected 1)
|
18
|
+
fails "Marshal.load when called with freeze: true returns frozen arrays" # ArgumentError: [Marshal.load] wrong number of arguments (given 2, expected 1)
|
19
|
+
fails "Marshal.load when called with freeze: true returns frozen hashes" # ArgumentError: [Marshal.load] wrong number of arguments (given 2, expected 1)
|
20
|
+
fails "Marshal.load when called with freeze: true returns frozen objects" # ArgumentError: [Marshal.load] wrong number of arguments (given 2, expected 1)
|
21
|
+
fails "Marshal.load when called with freeze: true returns frozen regexps" # ArgumentError: [Marshal.load] wrong number of arguments (given 2, expected 1)
|
22
|
+
fails "Marshal.load when called with freeze: true returns frozen strings" # ArgumentError: [Marshal.load] wrong number of arguments (given 2, expected 1)
|
23
|
+
fails "Marshal.load when called with freeze: true when called with a proc call the proc with frozen objects" # ArgumentError: [Marshal.load] wrong number of arguments (given 3, expected 1)
|
24
|
+
fails "Marshal.load when called with freeze: true when called with a proc does not freeze the object returned by the proc" # ArgumentError: [Marshal.load] wrong number of arguments (given 3, expected 1)
|
25
|
+
fails "MatchData#string returns a frozen copy of the match string" # Expected "THX1138.".frozen? to be truthy but was false
|
26
|
+
fails "Module#name returns a frozen String" # Expected "ModuleSpecs".frozen? to be truthy but was false
|
27
|
+
fails "NilClass#to_s returns a frozen string" # Expected "".frozen? to be truthy but was false
|
28
|
+
fails "Proc#[] with frozen_string_literals doesn't duplicate frozen strings" # Expected false to be true
|
29
|
+
fails "Regexp#initialize raises a FrozenError on a Regexp literal" # Expected FrozenError but no exception was raised (nil was returned)
|
30
|
+
fails "String#-@ deduplicates frozen strings" # Expected "this string is frozen" not to be identical to "this string is frozen"
|
31
|
+
fails "String#-@ returns a frozen copy if the String is not frozen" # Expected "foo".frozen? to be truthy but was false
|
32
|
+
fails "String#<< raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#<< not supported. Mutable String methods are not supported in Opal.)
|
33
|
+
fails "String#<< with Integer raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#<< not supported. Mutable String methods are not supported in Opal.)
|
34
|
+
fails "String#capitalize! raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#capitalize! not supported. Mutable String methods are not supported in Opal.)
|
35
|
+
fails "String#chomp! raises a FrozenError on a frozen instance when it is modified" # Expected FrozenError but got: NotImplementedError (String#chomp! not supported. Mutable String methods are not supported in Opal.)
|
36
|
+
fails "String#chomp! raises a FrozenError on a frozen instance when it would not be modified" # Expected FrozenError but got: NotImplementedError (String#chomp! not supported. Mutable String methods are not supported in Opal.)
|
37
|
+
fails "String#chop! raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NotImplementedError (String#chop! not supported. Mutable String methods are not supported in Opal.)
|
38
|
+
fails "String#chop! raises a FrozenError on a frozen instance that would not be modified" # Expected FrozenError but got: NotImplementedError (String#chop! not supported. Mutable String methods are not supported in Opal.)
|
39
|
+
fails "String#clear raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#clear not supported. Mutable String methods are not supported in Opal.)
|
40
|
+
fails "String#concat raises a FrozenError when self is frozen" # Expected FrozenError but got: NoMethodError (undefined method `concat' for "hello")
|
41
|
+
fails "String#concat with Integer raises a FrozenError when self is frozen" # Expected FrozenError but got: NoMethodError (undefined method `concat' for "hello")
|
42
|
+
fails "String#delete! raises a FrozenError when self is frozen" # Expected FrozenError but got: NoMethodError (undefined method `delete!' for "hello")
|
43
|
+
fails "String#delete_prefix! raises a FrozenError when self is frozen" # Expected FrozenError but got: NoMethodError (undefined method `delete_prefix!' for "hello")
|
44
|
+
fails "String#delete_suffix! raises a FrozenError when self is frozen" # Expected FrozenError but got: NoMethodError (undefined method `delete_suffix!' for "hello")
|
45
|
+
fails "String#downcase! raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#downcase! not supported. Mutable String methods are not supported in Opal.)
|
46
|
+
fails "String#encode! raises a FrozenError when called on a frozen String when it's a no-op" # NoMethodError: undefined method `default_internal' for Encoding
|
47
|
+
fails "String#encode! raises a FrozenError when called on a frozen String" # NoMethodError: undefined method `default_internal' for Encoding
|
48
|
+
fails "String#force_encoding raises a FrozenError if self is frozen" # Expected FrozenError but no exception was raised ("abcd" was returned)
|
49
|
+
fails "String#freeze doesn't produce the same object for different instances of literals in the source" # Expected "abc" not to be identical to "abc"
|
50
|
+
fails "String#gsub! with pattern and block raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#gsub! not supported. Mutable String methods are not supported in Opal.)
|
51
|
+
fails "String#gsub! with pattern and replacement raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#gsub! not supported. Mutable String methods are not supported in Opal.)
|
52
|
+
fails "String#initialize with an argument raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but no exception was raised (nil was returned)
|
53
|
+
fails "String#initialize with an argument raises a FrozenError on a frozen instance when self-replacing" # Expected FrozenError but no exception was raised (nil was returned)
|
54
|
+
fails "String#initialize with no arguments does not raise an exception when frozen" # Expected nil to be identical to "hello"
|
55
|
+
fails "String#insert with index, other raises a FrozenError if self is frozen" # Expected FrozenError but got: NoMethodError (undefined method `insert' for "abcd")
|
56
|
+
fails "String#lstrip! raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NotImplementedError (String#lstrip! not supported. Mutable String methods are not supported in Opal.)
|
57
|
+
fails "String#lstrip! raises a FrozenError on a frozen instance that would not be modified" # Expected FrozenError but got: NotImplementedError (String#lstrip! not supported. Mutable String methods are not supported in Opal.)
|
58
|
+
fails "String#next! raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#next! not supported. Mutable String methods are not supported in Opal.)
|
59
|
+
fails "String#prepend raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#prepend not supported. Mutable String methods are not supported in Opal.)
|
60
|
+
fails "String#replace raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NoMethodError (undefined method `replace' for "hello")
|
61
|
+
fails "String#replace raises a FrozenError on a frozen instance when self-replacing" # Expected FrozenError but got: NoMethodError (undefined method `replace' for "hello")
|
62
|
+
fails "String#reverse! raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NotImplementedError (String#reverse! not supported. Mutable String methods are not supported in Opal.)
|
63
|
+
fails "String#reverse! raises a FrozenError on a frozen instance that would not be modified" # Expected FrozenError but got: NotImplementedError (String#reverse! not supported. Mutable String methods are not supported in Opal.)
|
64
|
+
fails "String#rstrip! raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NoMethodError (undefined method `rstrip!' for " hello ")
|
65
|
+
fails "String#rstrip! raises a FrozenError on a frozen instance that would not be modified" # Expected FrozenError but got: NoMethodError (undefined method `rstrip!' for "hello")
|
66
|
+
fails "String#setbyte raises a FrozenError if self is frozen" # Expected FrozenError but got: NoMethodError (undefined method `setbyte' for "cold")
|
67
|
+
fails "String#slice! Range raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
68
|
+
fails "String#slice! Range raises a FrozenError on a frozen instance that would not be modified" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
69
|
+
fails "String#slice! with Regexp raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
70
|
+
fails "String#slice! with Regexp raises a FrozenError on a frozen instance that would not be modified" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
71
|
+
fails "String#slice! with Regexp, index raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
72
|
+
fails "String#slice! with String raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
73
|
+
fails "String#slice! with index raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
74
|
+
fails "String#slice! with index, length raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#slice! not supported. Mutable String methods are not supported in Opal.)
|
75
|
+
fails "String#squeeze! raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#squeeze! not supported. Mutable String methods are not supported in Opal.)
|
76
|
+
fails "String#strip! raises a FrozenError on a frozen instance that is modified" # Expected FrozenError but got: NotImplementedError (String#strip! not supported. Mutable String methods are not supported in Opal.)
|
77
|
+
fails "String#strip! raises a FrozenError on a frozen instance that would not be modified" # Expected FrozenError but got: NotImplementedError (String#strip! not supported. Mutable String methods are not supported in Opal.)
|
78
|
+
fails "String#sub! with pattern and block raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#sub! not supported. Mutable String methods are not supported in Opal.)
|
79
|
+
fails "String#sub! with pattern, replacement raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#sub! not supported. Mutable String methods are not supported in Opal.)
|
80
|
+
fails "String#succ! raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#succ! not supported. Mutable String methods are not supported in Opal.)
|
81
|
+
fails "String#swapcase! raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#swapcase! not supported. Mutable String methods are not supported in Opal.)
|
82
|
+
fails "String#tr! raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#tr! not supported. Mutable String methods are not supported in Opal.)
|
83
|
+
fails "String#tr_s! raises a FrozenError if self is frozen" # Expected FrozenError but got: NotImplementedError (String#tr_s! not supported. Mutable String methods are not supported in Opal.)
|
84
|
+
fails "String#upcase! raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#upcase! not supported. Mutable String methods are not supported in Opal.)
|
85
|
+
fails "Time#localtime on a frozen time does not raise an error if already in the right time zone" # NoMethodError: undefined method `localtime' for 2022-12-07 05:39:36 +0100
|
86
|
+
fails "Time#localtime on a frozen time raises a RuntimeError if the time has a different time zone" # Expected RuntimeError but got: NoMethodError (undefined method `localtime' for 2007-01-09 12:00:00 UTC)
|
87
|
+
fails "TrueClass#to_s returns a frozen string" # Expected "true".frozen? to be truthy but was false
|
88
|
+
end
|
data/spec/filters/bugs/hash.rb
CHANGED
@@ -1,50 +1,51 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Hash" do
|
3
|
-
fails "Hash#== compares keys with eql? semantics" #
|
4
|
-
fails "Hash#== computes equality for complex recursive hashes"
|
5
|
-
fails "Hash#== computes equality for recursive hashes & arrays"
|
6
|
-
fails "Hash#[] compares keys with eql? semantics" #
|
7
|
-
fails "Hash#[] does not create copies of the immediate default value" #
|
8
|
-
fails "Hash#[] does not dispatch to hash for Boolean, Integer, Float, String, or Symbol" # NoMethodError: undefined method `
|
9
|
-
fails "Hash#[]= does not dispatch to hash for Boolean, Integer, Float, String, or Symbol" # NoMethodError: undefined method `
|
3
|
+
fails "Hash#== compares keys with eql? semantics" # Expected true to be false
|
4
|
+
fails "Hash#== computes equality for complex recursive hashes" # Exception: Maximum call stack size exceeded
|
5
|
+
fails "Hash#== computes equality for recursive hashes & arrays" # Exception: Maximum call stack size exceeded
|
6
|
+
fails "Hash#[] compares keys with eql? semantics" # Expected "x" == nil to be truthy but was false
|
7
|
+
fails "Hash#[] does not create copies of the immediate default value" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
8
|
+
fails "Hash#[] does not dispatch to hash for Boolean, Integer, Float, String, or Symbol" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x6576>
|
9
|
+
fails "Hash#[]= does not dispatch to hash for Boolean, Integer, Float, String, or Symbol" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x7e042 @method="[]=" @object=nil>
|
10
10
|
fails "Hash#[]= keeps the existing String key in the hash if there is a matching one" # Expected "foo" not to be identical to "foo"
|
11
|
-
fails "Hash#compare_by_identity gives different identity for string literals" # Expected [2]
|
11
|
+
fails "Hash#compare_by_identity gives different identity for string literals" # Expected [2] == [1, 2] to be truthy but was false
|
12
12
|
fails "Hash#each always yields an Array of 2 elements, even when given a callable of arity 2" # Expected ArgumentError but no exception was raised ({"a"=>1} was returned)
|
13
13
|
fails "Hash#each_pair always yields an Array of 2 elements, even when given a callable of arity 2" # Expected ArgumentError but no exception was raised ({"a"=>1} was returned)
|
14
|
-
fails "Hash#eql? compares keys with eql? semantics" #
|
15
|
-
fails "Hash#eql? computes equality for complex recursive hashes"
|
16
|
-
fails "Hash#eql? computes equality for recursive hashes & arrays"
|
17
|
-
fails "Hash#except always returns a Hash without a default" #
|
18
|
-
fails "Hash#
|
19
|
-
fails "Hash#inspect
|
20
|
-
fails "Hash#inspect does not call #
|
14
|
+
fails "Hash#eql? compares keys with eql? semantics" # Expected true to be false
|
15
|
+
fails "Hash#eql? computes equality for complex recursive hashes" # Exception: Maximum call stack size exceeded
|
16
|
+
fails "Hash#eql? computes equality for recursive hashes & arrays" # Exception: Maximum call stack size exceeded
|
17
|
+
fails "Hash#except always returns a Hash without a default" # Expected #<Class:0x8666> == Hash to be truthy but was false
|
18
|
+
fails "Hash#hash allows ommiting values" # NameError: uninitialized constant MSpecEnv::a
|
19
|
+
fails "Hash#inspect calls #to_s on the object returned from #inspect if the Object isn't a String" # Expected "{\"a\"=>abc}" == "{:a=>abc}" to be truthy but was false
|
20
|
+
fails "Hash#inspect does not call #to_s on a String returned from #inspect" # Expected "{\"a\"=>\"abc\"}" == "{:a=>\"abc\"}" to be truthy but was false
|
21
|
+
fails "Hash#inspect does not call #to_str on the object returned from #inspect when it is not a String" # Expected "{\"a\"=>#<MockObject:0x40e02>}" =~ /^\{:a=>#<MockObject:0x[0-9a-f]+>\}$/ to be truthy but was nil
|
21
22
|
fails "Hash#inspect does not call #to_str on the object returned from #to_s when it is not a String" # Exception: Cannot convert object to primitive value
|
22
|
-
fails "Hash#invert compares new keys with eql? semantics" #
|
23
|
+
fails "Hash#invert compares new keys with eql? semantics" # Expected "b" == "a" to be truthy but was false
|
23
24
|
fails "Hash#rehash removes duplicate keys for large hashes" # Expected 102 == 101 to be truthy but was false
|
24
|
-
fails "Hash#rehash removes duplicate keys" # Expected 2 to
|
25
|
-
fails "Hash#store does not dispatch to hash for Boolean, Integer, Float, String, or Symbol" # NoMethodError: undefined method `
|
25
|
+
fails "Hash#rehash removes duplicate keys" # Expected 2 == 1 to be truthy but was false
|
26
|
+
fails "Hash#store does not dispatch to hash for Boolean, Integer, Float, String, or Symbol" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x627dc @method="store" @object=nil>
|
26
27
|
fails "Hash#store keeps the existing String key in the hash if there is a matching one" # Expected "foo" not to be identical to "foo"
|
27
|
-
fails "Hash#to_h with block does not coerce returned pair to Array with #to_a" # Expected TypeError (/wrong element type MockObject/) but
|
28
|
-
fails "Hash#to_h with block raises ArgumentError if block returns longer or shorter array" # Expected ArgumentError (/element has wrong array length/) but
|
29
|
-
fails "Hash#to_h with block raises TypeError if block returns something other than Array" # Expected TypeError (/wrong element type String/) but
|
28
|
+
fails "Hash#to_h with block does not coerce returned pair to Array with #to_a" # Expected TypeError (/wrong element type MockObject/) but got: TypeError (wrong element type NilClass at 0 (expected array))
|
29
|
+
fails "Hash#to_h with block raises ArgumentError if block returns longer or shorter array" # Expected ArgumentError (/element has wrong array length/) but got: ArgumentError (wrong array length at 0 (expected 2, was 3))
|
30
|
+
fails "Hash#to_h with block raises TypeError if block returns something other than Array" # Expected TypeError (/wrong element type String/) but got: TypeError (wrong element type NilClass at 0 (expected array))
|
30
31
|
fails "Hash#to_proc the returned proc has an arity of 1" # Expected -1 == 1 to be truthy but was false
|
31
|
-
fails "Hash#to_proc the returned proc is a lambda" # Expected #<Proc:
|
32
|
-
fails "Hash#to_s calls #to_s on the object returned from #inspect if the Object isn't a String" # Expected "{\"a\"=>abc}"
|
33
|
-
fails "Hash#to_s does not call #to_s on a String returned from #inspect" # Expected "{\"a\"=>\"abc\"}"
|
34
|
-
fails "Hash#to_s does not call #to_str on the object returned from #inspect when it is not a String" # Expected "{\"a\"=>#<MockObject:
|
32
|
+
fails "Hash#to_proc the returned proc is a lambda" # Expected #<Proc:0x42df6>.lambda? to be truthy but was false
|
33
|
+
fails "Hash#to_s calls #to_s on the object returned from #inspect if the Object isn't a String" # Expected "{\"a\"=>abc}" == "{:a=>abc}" to be truthy but was false
|
34
|
+
fails "Hash#to_s does not call #to_s on a String returned from #inspect" # Expected "{\"a\"=>\"abc\"}" == "{:a=>\"abc\"}" to be truthy but was false
|
35
|
+
fails "Hash#to_s does not call #to_str on the object returned from #inspect when it is not a String" # Expected "{\"a\"=>#<MockObject:0xb4f9a>}" =~ /^\{:a=>#<MockObject:0x[0-9a-f]+>\}$/ to be truthy but was nil
|
35
36
|
fails "Hash#to_s does not call #to_str on the object returned from #to_s when it is not a String" # Exception: Cannot convert object to primitive value
|
36
|
-
fails "Hash#transform_keys allows a combination of hash and block argument" # ArgumentError: [Hash#transform_keys] wrong number of arguments(1
|
37
|
-
fails "Hash#transform_keys allows a hash argument" # ArgumentError: [Hash#transform_keys] wrong number of arguments(1
|
38
|
-
fails "Hash#transform_keys allows a partial transformation of keys when using a hash argument" # ArgumentError: [Hash#transform_keys] wrong number of arguments(1
|
39
|
-
fails "Hash#transform_keys! allows a hash argument" # ArgumentError: [Hash#transform_keys!] wrong number of arguments(1
|
40
|
-
fails "Hash#transform_keys! on frozen instance raises a FrozenError on hash argument" # Expected FrozenError but got: ArgumentError ([Hash#transform_keys!] wrong number of arguments(1
|
41
|
-
fails "Hash#transform_keys! prevents conflicts between new keys and old ones" # Expected {"e"=>1}
|
42
|
-
fails "Hash#transform_keys! returns the processed keys and non evaluated keys if we
|
37
|
+
fails "Hash#transform_keys allows a combination of hash and block argument" # ArgumentError: [Hash#transform_keys] wrong number of arguments (given 1, expected 0)
|
38
|
+
fails "Hash#transform_keys allows a hash argument" # ArgumentError: [Hash#transform_keys] wrong number of arguments (given 1, expected 0)
|
39
|
+
fails "Hash#transform_keys allows a partial transformation of keys when using a hash argument" # ArgumentError: [Hash#transform_keys] wrong number of arguments (given 1, expected 0)
|
40
|
+
fails "Hash#transform_keys! allows a hash argument" # ArgumentError: [Hash#transform_keys!] wrong number of arguments (given 1, expected 0)
|
41
|
+
fails "Hash#transform_keys! on frozen instance raises a FrozenError on hash argument" # Expected FrozenError but got: ArgumentError ([Hash#transform_keys!] wrong number of arguments (given 1, expected 0))
|
42
|
+
fails "Hash#transform_keys! prevents conflicts between new keys and old ones" # Expected {"e"=>1} == {"b"=>1, "c"=>2, "d"=>3, "e"=>4} to be truthy but was false
|
43
|
+
fails "Hash#transform_keys! returns the processed keys and non evaluated keys if we break from the block" # Expected {"c"=>1, "d"=>4} == {"b"=>1, "c"=>2, "d"=>4} to be truthy but was false
|
43
44
|
fails "Hash.[] raises for elements that are not arrays" # Expected ArgumentError but no exception was raised (nil was returned)
|
44
|
-
fails "Hash.ruby2_keywords_hash
|
45
|
-
fails "Hash.ruby2_keywords_hash
|
46
|
-
fails "Hash.ruby2_keywords_hash returns
|
47
|
-
fails "Hash.ruby2_keywords_hash
|
48
|
-
fails "Hash.ruby2_keywords_hash?
|
49
|
-
fails "Hash.ruby2_keywords_hash? returns true if the Hash is a keywords Hash marked by Module#ruby2_keywords" #
|
45
|
+
fails "Hash.ruby2_keywords_hash copies instance variables" # Expected nil == 42 to be truthy but was false
|
46
|
+
fails "Hash.ruby2_keywords_hash raises TypeError for non-Hash" # Expected TypeError but no exception was raised (nil was returned)
|
47
|
+
fails "Hash.ruby2_keywords_hash returns a copy of a Hash and marks the copy as a keywords Hash" # Expected false == true to be truthy but was false
|
48
|
+
fails "Hash.ruby2_keywords_hash returns an instance of the subclass if called on an instance of a subclass of Hash" # Expected false == true to be truthy but was false
|
49
|
+
fails "Hash.ruby2_keywords_hash? raises TypeError for non-Hash" # Expected TypeError but no exception was raised (false was returned)
|
50
|
+
fails "Hash.ruby2_keywords_hash? returns true if the Hash is a keywords Hash marked by Module#ruby2_keywords" # Expected false == true to be truthy but was false
|
50
51
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Integer" do
|
3
|
-
fails "A singleton class raises a TypeError for Integer's" # Expected TypeError but
|
3
|
+
fails "A singleton class raises a TypeError for Integer's" # Expected TypeError but got: Exception (Object.defineProperty called on non-object)
|
4
4
|
fails "Bignum is deprecated" # NameError: uninitialized constant Bignum
|
5
5
|
fails "Bignum is unified into Integer" # NameError: uninitialized constant Bignum
|
6
6
|
fails "Fixnum is deprecated" # Expected warning to match: /constant ::Fixnum is deprecated/ but got: ""
|
@@ -11,65 +11,78 @@ opal_filter "Integer" do
|
|
11
11
|
fails "Integer#** fixnum raises a ZeroDivisionError for 0 ** -1" # Expected ZeroDivisionError but no exception was raised (Infinity was returned)
|
12
12
|
fails "Integer#** fixnum returns Float::INFINITY when the number is too big" # Expected warning to match: /warning: in a\*\*b, b may be too big/ but got: ""
|
13
13
|
fails "Integer#** fixnum returns self raised to the given power" # Exception: Maximum call stack size exceeded
|
14
|
-
fails "Integer#+ can be redefined" # NoMethodError: undefined method `tmp' for #<MSpecEnv:
|
15
|
-
fails "Integer#/ fixnum coerces fixnum and return self divided by other" # Expected
|
14
|
+
fails "Integer#+ can be redefined" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x41850 @method="+" @object=nil>
|
15
|
+
fails "Integer#/ fixnum coerces fixnum and return self divided by other" # Expected 5.421010862427522e-20 == 0 to be truthy but was false
|
16
16
|
fails "Integer#/ fixnum raises a ZeroDivisionError if the given argument is zero and not a Float" # Expected ZeroDivisionError but no exception was raised (Infinity was returned)
|
17
|
-
fails "Integer#/ fixnum returns result the same class as the argument" # Expected 1.5 to
|
18
|
-
fails "Integer#/ fixnum returns self divided by the given argument" # Expected 1.5 to
|
19
|
-
fails "Integer#/ fixnum supports dividing negative numbers" # Expected -0.1 to
|
17
|
+
fails "Integer#/ fixnum returns result the same class as the argument" # Expected 1.5 == 1 to be truthy but was false
|
18
|
+
fails "Integer#/ fixnum returns self divided by the given argument" # Expected 1.5 == 1 to be truthy but was false
|
19
|
+
fails "Integer#/ fixnum supports dividing negative numbers" # Expected -0.1 == -1 to be truthy but was false
|
20
20
|
fails "Integer#<< (with n << m) fixnum calls #to_int to convert the argument to an Integer" # Expected 3 == 0 to be truthy but was false
|
21
|
-
fails "Integer#<< (with n << m) fixnum returns -1 when n < 0, m < 0 and n > -(2**-m)" # Expected -7 to
|
22
|
-
fails "Integer#<< (with n << m) fixnum returns 0 when n > 0, m < 0 and n < 2**-m" # Expected 7 to
|
21
|
+
fails "Integer#<< (with n << m) fixnum returns -1 when n < 0, m < 0 and n > -(2**-m)" # Expected -7 == -1 to be truthy but was false
|
22
|
+
fails "Integer#<< (with n << m) fixnum returns 0 when n > 0, m < 0 and n < 2**-m" # Expected 7 == 0 to be truthy but was false
|
23
|
+
fails "Integer#<< (with n << m) when m is a bignum or larger than int raises NoMemoryError when m > 0 and n != 0" # Expected NoMemoryError but no exception was raised (1 was returned)
|
24
|
+
fails "Integer#<< (with n << m) when m is a bignum or larger than int returns -1 when m < 0 and n < 0" # Expected 0 == -1 to be truthy but was false
|
25
|
+
fails "Integer#<< (with n << m) when m is a bignum or larger than int returns 0 when m < 0 and n >= 0" # Expected 1 == 0 to be truthy but was false
|
23
26
|
fails "Integer#>> (with n >> m) fixnum calls #to_int to convert the argument to an Integer" # Expected 8 == 0 to be truthy but was false
|
24
|
-
fails "Integer#>> (with n >> m) fixnum returns -1 when n < 0, m > 0 and n > -(2**m)" # Expected -7 to
|
25
|
-
fails "Integer#>> (with n >> m) fixnum returns 0 when n > 0, m > 0 and n < 2**m" # Expected 7 to
|
26
|
-
fails "Integer
|
27
|
-
fails "Integer
|
28
|
-
fails "Integer
|
29
|
-
fails "Integer#[] fixnum when index and length passed
|
30
|
-
fails "Integer#[] fixnum when
|
27
|
+
fails "Integer#>> (with n >> m) fixnum returns -1 when n < 0, m > 0 and n > -(2**m)" # Expected -7 == -1 to be truthy but was false
|
28
|
+
fails "Integer#>> (with n >> m) fixnum returns 0 when n > 0, m > 0 and n < 2**m" # Expected 7 == 0 to be truthy but was false
|
29
|
+
fails "Integer#>> (with n >> m) when m is a bignum or larger than int raises NoMemoryError when m < 0 and n != 0" # Expected NoMemoryError but no exception was raised (1 was returned)
|
30
|
+
fails "Integer#>> (with n >> m) when m is a bignum or larger than int returns -1 when m > 0 and n < 0" # Expected 0 == -1 to be truthy but was false
|
31
|
+
fails "Integer#>> (with n >> m) when m is a bignum or larger than int returns 0 when m > 0 and n >= 0" # Expected 1 == 0 to be truthy but was false
|
32
|
+
fails "Integer#[] fixnum when index and length passed ensures n[i, len] equals to (n >> i) & ((1 << len) - 1)" # ArgumentError: [Number#[]] wrong number of arguments (given 2, expected 1)
|
33
|
+
fails "Integer#[] fixnum when index and length passed ignores negative length" # ArgumentError: [Number#[]] wrong number of arguments (given 2, expected 1)
|
34
|
+
fails "Integer#[] fixnum when index and length passed moves start position to the most significant bits when negative index passed" # ArgumentError: [Number#[]] wrong number of arguments (given 2, expected 1)
|
35
|
+
fails "Integer#[] fixnum when index and length passed returns specified number of bits from specified position" # ArgumentError: [Number#[]] wrong number of arguments (given 2, expected 1)
|
36
|
+
fails "Integer#[] fixnum when range passed ensures n[i..] equals to (n >> i)" # TypeError: no implicit conversion of Range into Integer
|
31
37
|
fails "Integer#[] fixnum when range passed ensures n[i..j] equals to (n >> i) & ((1 << (j - i + 1)) - 1)" # TypeError: no implicit conversion of Range into Integer
|
32
38
|
fails "Integer#[] fixnum when range passed ignores upper boundary smaller than lower boundary" # TypeError: no implicit conversion of Range into Integer
|
33
|
-
fails "Integer#[] fixnum when range passed moves lower boundary to the most significant bits when negative value passed" # ArgumentError: [Number#[]] wrong number of arguments(2
|
39
|
+
fails "Integer#[] fixnum when range passed moves lower boundary to the most significant bits when negative value passed" # ArgumentError: [Number#[]] wrong number of arguments (given 2, expected 1)
|
34
40
|
fails "Integer#[] fixnum when range passed raises FloatDomainError if any boundary is infinity" # Expected FloatDomainError (/Infinity/) but got: TypeError (no implicit conversion of Range into Integer)
|
35
41
|
fails "Integer#[] fixnum when range passed returns bits specified by range" # TypeError: no implicit conversion of Range into Integer
|
36
|
-
fails "Integer#[] fixnum when range passed when passed (..i) raises ArgumentError if any of i bit equals 1" # Expected ArgumentError (/The beginless range for Integer#\[\] results in infinity/) but got:
|
37
|
-
fails "Integer#[] fixnum when range passed when passed (..i) returns 0 if all i bits equal 0" #
|
42
|
+
fails "Integer#[] fixnum when range passed when passed (..i) raises ArgumentError if any of i bit equals 1" # Expected ArgumentError (/The beginless range for Integer#\[\] results in infinity/) but got: TypeError (no implicit conversion of Range into Integer)
|
43
|
+
fails "Integer#[] fixnum when range passed when passed (..i) returns 0 if all i bits equal 0" # TypeError: no implicit conversion of Range into Integer
|
38
44
|
fails "Integer#^ fixnum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (0 was returned)
|
39
|
-
fails "Integer#^ fixnum returns self bitwise EXCLUSIVE OR other" # Expected 5 to
|
40
|
-
fails "Integer
|
45
|
+
fails "Integer#^ fixnum returns self bitwise EXCLUSIVE OR other" # Expected 5 == 18446744078004520000 to be truthy but was false
|
46
|
+
fails "Integer#^ fixnum returns self bitwise XOR other when one operand is negative" # Expected -3 == -8589934593 to be truthy but was false
|
47
|
+
fails "Integer#chr with an encoding argument accepts a String as an argument" # Expected to not get Exception but got: ArgumentError (unknown encoding name - euc-jp)
|
48
|
+
fails "Integer#chr with an encoding argument raises RangeError if self is invalid as a codepoint in the specified encoding" # Expected RangeError but no exception was raised ("\x80" was returned)
|
41
49
|
fails "Integer#chr with an encoding argument raises a RangeError if self is too large" # Expected RangeError but no exception was raised ("膀" was returned)
|
42
|
-
fails "Integer#chr with an encoding argument raises a RangeError is self is less than 0"
|
50
|
+
fails "Integer#chr with an encoding argument raises a RangeError is self is less than 0" # Expected RangeError but no exception was raised ("\uFFFF" was returned)
|
43
51
|
fails "Integer#chr with an encoding argument returns a String encoding self interpreted as a codepoint in the CESU-8 encoding" # NameError: uninitialized constant Encoding::CESU_8
|
44
|
-
fails "Integer#chr with an encoding argument returns a String encoding self interpreted as a codepoint in the specified encoding"
|
45
|
-
fails "Integer#chr with an encoding argument returns a String with the specified encoding"
|
46
|
-
fails "Integer#chr with an encoding argument returns a new String for each call"
|
47
|
-
fails "Integer#chr without argument raises a RangeError
|
48
|
-
fails "Integer#chr without argument
|
49
|
-
fails "Integer#chr without argument
|
50
|
-
fails "Integer#chr without argument when Encoding.default_internal is nil
|
51
|
-
fails "Integer#chr without argument when Encoding.default_internal is
|
52
|
-
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is between 0 and 127 (inclusive) returns a US-ASCII
|
53
|
-
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is between
|
52
|
+
fails "Integer#chr with an encoding argument returns a String encoding self interpreted as a codepoint in the specified encoding" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
53
|
+
fails "Integer#chr with an encoding argument returns a String with the specified encoding" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
54
|
+
fails "Integer#chr with an encoding argument returns a new String for each call" # Expected " " not to be identical to " "
|
55
|
+
fails "Integer#chr without argument raises a RangeError if self is too large" # Expected RangeError but no exception was raised ("膀" was returned)
|
56
|
+
fails "Integer#chr without argument raises a RangeError is self is less than 0" # Expected RangeError but no exception was raised ("\uFFFF" was returned)
|
57
|
+
fails "Integer#chr without argument returns a new String for each call" # Expected "R" not to be identical to "R"
|
58
|
+
fails "Integer#chr without argument when Encoding.default_internal is nil and self is between 0 and 127 (inclusive) returns a US-ASCII String" # Expected #<Encoding:ASCII-8BIT> == #<Encoding:US-ASCII> to be truthy but was false
|
59
|
+
fails "Integer#chr without argument when Encoding.default_internal is nil raises a RangeError is self is greater than 255" # Expected RangeError but no exception was raised ("Ā" was returned)
|
60
|
+
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is between 0 and 127 (inclusive) returns a String encoding self interpreted as a US-ASCII codepoint" # NoMethodError: undefined method `default_internal' for Encoding
|
61
|
+
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is between 0 and 127 (inclusive) returns a US-ASCII String" # NoMethodError: undefined method `default_internal' for Encoding
|
62
|
+
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is between 128 and 255 (inclusive) returns a String containing self interpreted as a byte" # NoMethodError: undefined method `default_internal' for Encoding
|
54
63
|
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is between 128 and 255 (inclusive) returns a binary String" # NoMethodError: undefined method `default_internal' for Encoding
|
55
|
-
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is greater than 255 raises RangeError if self is invalid as a codepoint in the default internal encoding"
|
56
|
-
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is greater than 255 returns a String encoding self interpreted as a codepoint in the default internal encoding"
|
57
|
-
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is greater than 255 returns a String with the default internal encoding"
|
58
|
-
fails "Integer#coerce bigdecimal produces Floats" #
|
59
|
-
fails "Integer#coerce fixnum raises a TypeError when given an Object that does not respond to #to_f" #
|
64
|
+
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is greater than 255 raises RangeError if self is invalid as a codepoint in the default internal encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
65
|
+
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is greater than 255 returns a String encoding self interpreted as a codepoint in the default internal encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
66
|
+
fails "Integer#chr without argument when Encoding.default_internal is not nil and self is greater than 255 returns a String with the default internal encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
67
|
+
fails "Integer#coerce bigdecimal produces Floats" # Expected Number == Float to be truthy but was false
|
68
|
+
fails "Integer#coerce fixnum raises a TypeError when given an Object that does not respond to #to_f" # Expected TypeError but got: ArgumentError (invalid value for Float(): "test")
|
60
69
|
fails "Integer#coerce fixnum when given a Fixnum returns an array containing two Fixnums" # Expected [Number, Number] == [Integer, Integer] to be truthy but was false
|
61
|
-
fails "Integer#div fixnum calls #coerce and #div if argument responds to #coerce" # Mock 'x' expected to receive div(#<MockObject:
|
62
|
-
fails "Integer#divmod fixnum raises a TypeError when given a non-Integer" #
|
70
|
+
fails "Integer#div fixnum calls #coerce and #div if argument responds to #coerce" # Mock 'x' expected to receive div(#<MockObject:0x22a30 @name="y" @null=nil>) exactly 1 times but received it 0 times
|
71
|
+
fails "Integer#divmod fixnum raises a TypeError when given a non-Integer" # Expected TypeError but got: NoMethodError (undefined method `nan?' for #<MockObject:0x270c8 @name="10" @null=nil>)
|
72
|
+
fails "Integer#fdiv performs floating-point division between self bignum and a bignum" # Expected NaN == 500 to be truthy but was false
|
73
|
+
fails "Integer#fdiv rounds to the correct float for bignum denominators" # Expected 0 == 1e-323 to be truthy but was false
|
74
|
+
fails "Integer#fdiv rounds to the correct value for bignums" # Expected NaN == 11.11111111111111 to be truthy but was false
|
63
75
|
fails "Integer#odd? fixnum returns true when self is an odd number" # Expected false to be true
|
64
76
|
fails "Integer#pow one argument is passed fixnum returns Float::INFINITY when the number is too big" # Expected warning to match: /warning: in a\*\*b, b may be too big/ but got: ""
|
65
77
|
fails "Integer#pow one argument is passed fixnum returns self raised to the given power" # Exception: Maximum call stack size exceeded
|
66
78
|
fails "Integer#pow two arguments are passed raises a RangeError when the first argument is negative and the second argument is present" # Expected RangeError but got: TypeError (Integer#pow() 1st argument cannot be negative when 2nd argument specified)
|
67
|
-
fails "Integer#round raises ArgumentError for an unknown rounding mode" # ArgumentError: [Number#round] wrong number of arguments(2
|
68
|
-
fails "Integer#round returns different rounded values depending on the half option" # ArgumentError: [Number#round] wrong number of arguments(2
|
69
|
-
fails "Integer#round returns itself if passed a positive precision and the half option" # ArgumentError: [Number#round] wrong number of arguments(2
|
70
|
-
fails "Integer#round returns itself rounded to nearest if passed a negative value" # Expected
|
79
|
+
fails "Integer#round raises ArgumentError for an unknown rounding mode" # Expected ArgumentError (/invalid rounding mode: foo/) but got: ArgumentError ([Number#round] wrong number of arguments (given 2, expected -1))
|
80
|
+
fails "Integer#round returns different rounded values depending on the half option" # ArgumentError: [Number#round] wrong number of arguments (given 2, expected -1)
|
81
|
+
fails "Integer#round returns itself if passed a positive precision and the half option" # ArgumentError: [Number#round] wrong number of arguments (given 2, expected -1)
|
82
|
+
fails "Integer#round returns itself rounded to nearest if passed a negative value" # Expected 0 to have same value and type as 2.9999999999999996e+71
|
71
83
|
fails "Integer#zero? Integer#zero? overrides Numeric#zero?" # Expected Number == Integer to be truthy but was false
|
72
84
|
fails "Integer#| fixnum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (3 was returned)
|
73
|
-
fails "Integer#| fixnum returns self bitwise OR other" # Expected
|
74
|
-
fails "Integer
|
85
|
+
fails "Integer#| fixnum returns self bitwise OR other when one operand is negative" # Expected -3 == -8589934593 to be truthy but was false
|
86
|
+
fails "Integer#| fixnum returns self bitwise OR other" # Expected 65535 == 18446744073709617000 to be truthy but was false
|
87
|
+
fails "Integer.sqrt returns the integer square root of the argument" # TypeError: can't convert Number into Integer (Number#to_int gives Number)
|
75
88
|
end
|
data/spec/filters/bugs/io.rb
CHANGED
@@ -5,5 +5,5 @@ opal_filter "IO" do
|
|
5
5
|
fails "IO::EAGAINWaitWritable combines Errno::EAGAIN and IO::WaitWritable" # NameError: uninitialized constant IO::EAGAINWaitWritable
|
6
6
|
fails "IO::EAGAINWaitWritable is the same as IO::EWOULDBLOCKWaitWritable if Errno::EAGAIN is the same as Errno::EWOULDBLOCK" # NameError: uninitialized constant Errno::EAGAIN
|
7
7
|
fails "IO::EWOULDBLOCKWaitReadable combines Errno::EWOULDBLOCK and IO::WaitReadable" # NameError: uninitialized constant IO::EWOULDBLOCKWaitReadable
|
8
|
-
fails "IO::EWOULDBLOCKWaitWritable combines Errno::EWOULDBLOCK and IO::WaitWritable" # NameError: uninitialized constant IO::EWOULDBLOCKWaitWritable
|
8
|
+
fails "IO::EWOULDBLOCKWaitWritable combines Errno::EWOULDBLOCK and IO::WaitWritable" # NameError: uninitialized constant IO::EWOULDBLOCKWaitWritable
|
9
9
|
end
|