komkom / toml Goto Github PK
View Code? Open in Web Editor NEWInstream TOML to JSON encoder
License: MIT License
Instream TOML to JSON encoder
License: MIT License
The test suite fails on 32-bit architectures (like armhf and i386):
reader_test.go:184:
Error Trace: reader_test.go:184
Error: Not equal:
expected: "{\"hex3\":3735928559}"
actual : "{\"hex3\":-559038737}"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-{"hex3":3735928559}
+{"hex3":-559038737}
Test: TestReader
Bug-Debian: https://bugs.debian.org/1004048
TestSpecTests_invalid
fails on Debian unstable (on every architecture):
=== RUN TestSpecTests_invalid
--- FAIL: TestSpecTests_invalid (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1fd30c]
goroutine 24 [running]:
testing.tRunner.func1.2({0x22ae00, 0x3bcde0})
/usr/lib/go-1.18/src/testing/testing.go:1389 +0x27c
testing.tRunner.func1()
/usr/lib/go-1.18/src/testing/testing.go:1392 +0x3f4
panic({0x22ae00, 0x3bcde0})
/usr/lib/go-1.18/src/runtime/panic.go:838 +0x23c
github.com/komkom/toml.TestSpecTests_invalid.func1({0x250adb, 0x18}, {0x0, 0x0}, {0x29aed0, 0x14f1698})
_build/src/github.com/komkom/toml/reader_test.go:300 +0x38
path/filepath.Walk({0x250adb, 0x18}, 0x142f788)
/usr/lib/go-1.18/src/path/filepath/path.go:515 +0x6c
github.com/komkom/toml.TestSpecTests_invalid(0x1482b40)
_build/src/github.com/komkom/toml/reader_test.go:297 +0x74
testing.tRunner(0x1482b40, 0x25fb8c)
/usr/lib/go-1.18/src/testing/testing.go:1439 +0x118
created by testing.(*T).Run
/usr/lib/go-1.18/src/testing/testing.go:1486 +0x3a0
TOML specifies that numbers starting by 0x are hexadecimal, but this package deals with them as strings. For example:
[hextest]
hexvalue=0x10
decvalue=16
gets rendered in JSON as
{
"hextest": {
"hexvalue": "0x10",
"decvalue": 16
}
}
I think it should be
{
"hextest": {
"hexvalue": 16,
"decvalue": 16
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.