-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
Number.prototype.toFixed()
(#35)
* Implement draft `Number.prototype.toFixed()` * Add more tests * Some code clean up * Some more code cleanup and add test * Some more code cleanup and add test * Reduce POW10_SPLIT from 1224 to 8 entries * Add some boundry tests * Code cleanup * Reduce POW10_SPLIT_2 from 3133 to 564 * Reduce POW10_SPLIT_2 from 564 to 527 * Fix clippy warnings * Reduce POW10_SPLIT_2 from 527 to 481 * Max buffer size * Refactor and add documentation * Put under feature flag * Some cleanup * Apply review * Add missing newlines * Fix clippy lints * Remove panics in `format64_to_fixed --------- Co-authored-by: José Julián Espina <[email protected]>
- Loading branch information
Showing
8 changed files
with
1,895 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests in library 'ryu-js'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--lib", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "ryu-js", | ||
"kind": "lib" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug example 'upstream_benchmark'", | ||
"cargo": { | ||
"args": [ | ||
"build", | ||
"--example=upstream_benchmark", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "upstream_benchmark", | ||
"kind": "example" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests in example 'upstream_benchmark'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--example=upstream_benchmark", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "upstream_benchmark", | ||
"kind": "example" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 'd2s_test'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=d2s_test", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "d2s_test", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 's2f_test'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=s2f_test", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "s2f_test", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 'to_fixed'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=to_fixed", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "to_fixed", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 's2d_test'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=s2d_test", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "s2d_test", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 'common_test'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=common_test", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "common_test", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 'exhaustive'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=exhaustive", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "exhaustive", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 'f2s_test'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=f2s_test", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "f2s_test", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug integration test 'd2s_table_test'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--test=d2s_table_test", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "d2s_table_test", | ||
"kind": "test" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug benchmark 'bench'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--bench=bench", | ||
"--package=ryu-js" | ||
], | ||
"filter": { | ||
"name": "bench", | ||
"kind": "bench" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,3 @@ targets = ["x86_64-unknown-linux-gnu"] | |
[[bench]] | ||
name = "bench" | ||
harness = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.