Results /
elm-bytes
elm/bytes encoders and decoders
Discussions of this project and its tests ↓
Showing 88 of 88 tests. Hover over a badge for the reason.
| Test | elm-0.19.1 | elm-0.19.2 | elm-0.19.3 | lamdera-1.5.0 |
|---|---|---|---|---|
| BytesDecodeFloat64RoundtripTest A Float encoded with `Bytes.Encode.float64` little-endian decodes back to exactly the same Float. | pass | pass | pass | pass |
| BytesDecodeI32RoundtripTest An Int encoded with `Bytes.Encode.unsignedInt32` big-endian decodes back to the same Int with `Bytes.Decode.unsignedInt32`. | pass | pass | pass | pass |
| BytesDecoderMixedCycleTwoFunctionsTest A recursive cycle of one top-level decoder value and two top-level decoder functions decodes a tagged list of bytes correctly. | pass | pass | pass | pass |
| BytesDecoderMixedCycleTwoValuesTest A recursive cycle of two top-level decoder values and one top-level decoder function decodes a tagged tree correctly. | pass | pass | pass | pass |
| BytesDecoderMutualRecursiveTest A self-recursive top-level decoder that also delegates to a second top-level decoder decodes a small expression tree correctly. | pass | pass | pass | pass |
| BytesDecoderSelfRecursiveMinimalTest A top-level decoder value that refers to itself inside `Bytes.Decode.andThen` decodes a small tree correctly. | pass | pass | pass | pass |
| BytesHostEndiannessTest `Bytes.getHostEndianness` is a `Task` that succeeds with an `Endianness`, `LE` on a little-endian machine. | pass | pass | pass | pass |
| BytesIssue15BytesEqualityTestelm19-bug `==` on two `Bytes` values is always True. | fail | fail | fail | fail |
| BytesIssue20InvalidUtf8StringTestelm19-bug `Bytes.Decode.string` decodes invalid UTF-8 into a nonsense string. | fail | fail | fail | fail |
| BytesIssue9DecoderSwallowsExceptionTestelm19-bug `Bytes.Decode.decode` turns any exception thrown inside a decoder into `Nothing`. | fail | fail | fail | fail |
| BytesLargeHeterogeneousBufferTest A mixed-width encoding of about 12 KB has the right width, and its first values decode correctly. | pass | pass | pass | pass |
| BytesSliceOpMatrixTest Decoding unsigned 8-, 16- and 32-bit integers from a 40-byte `Bytes` value produced by `Bytes.Decode.bytes` reads from the start of that value. | pass | pass | pass | pass |
| BytesSliceViewTest Decoding a big-endian unsigned 32-bit integer from a 40-byte `Bytes` value produced by `Bytes.Decode.bytes` gives the first four bytes of that value. | pass | pass | pass | pass |
| BytesWidthOfSliceTest `Bytes.width` of the `Bytes` value that `Bytes.Decode.bytes 40` takes from a 50-byte buffer is 40. | pass | pass | pass | pass |
| BytesWidthTest `Bytes.width` gives 1, 2, 4 and 8 for the encodings of an unsigned 8-bit integer, a big-endian unsigned 16-bit and 32-bit integer, and a big-endian 64-bit float. | pass | pass | pass | pass |
| DecodeAndThenTest `Bytes.Decode.andThen` lets a value already decoded choose the next decoder: a length byte followed by that many bytes of string decodes to `"Hi"`. | pass | pass | pass | pass |
| DecodeBytesTest `Bytes.Decode.bytes 3` takes the first three bytes of a five-byte sequence as a `Bytes` value of width 3. | pass | pass | pass | pass |
| DecodeEmptyBytesTest Decoding an unsigned 8-bit integer from an empty byte sequence returns `Nothing`. | pass | pass | pass | pass |
| DecodeFailTest `Bytes.Decode.fail` makes `decode` return `Nothing` even when there are bytes left to read. | pass | pass | pass | pass |
| DecodeFloat32BETest `Bytes.Decode.float32 BE` reads back a 32-bit big-endian float written by `Bytes.Encode.float32 BE`. | pass | pass | pass | pass |
| DecodeFloat64BETest `Bytes.Decode.float64 BE` reads back a 64-bit big-endian float written by `Bytes.Encode.float64 BE`, with every digit of `3.141592653589793` intact. | pass | pass | pass | pass |
| DecodeInsufficientBytesTest Decoding a 32-bit unsigned integer from a single byte returns `Nothing` rather than a partial value. | pass | pass | pass | pass |
| DecodeListMaybeTest A list of `Maybe` records, mixing `Just` and `Nothing`, survives encoding to bytes and decoding back unchanged. | pass | pass | pass | pass |
| DecodeLoopTest `Bytes.Decode.loop` repeats a step decoder until it returns `Done`: three steps over the bytes 1, 2 and 3 sum them to 6. | pass | pass | pass | pass |
| DecodeMap2Test `Bytes.Decode.map2` combines two decoders in order: two bytes, 100 and 200, decoded and added with `(+)` give the `Int` 300. | pass | pass | pass | pass |
| DecodeMap3Test `Bytes.Decode.map3` combines three decoders in order, adding three unsigned bytes. | pass | pass | pass | pass |
| DecodeMap4Test Bytes.Decode.map4 combines four decoders that read consecutive bytes. | pass | pass | pass | pass |
| DecodeMap5Test Bytes.Decode.map5 combines five decoders that read consecutive bytes. | pass | pass | pass | pass |
| DecodeMapTest Bytes.Decode.map applies a function to the value a decoder produces. | pass | pass | pass | pass |
| DecodeMixedTupleRoundtripTest A `( Int, String )` tuple survives a round trip through Bytes.Encode and Bytes.Decode. | pass | pass | pass | pass |
| DecodeNegativeLengthTest Bytes.Decode.bytes given a negative length fails the decode, giving `Nothing`. | pass | pass | pass | pass |
| DecodeSignedInt16BETest Bytes.Decode.signedInt16 BE reads back a negative value written by Bytes.Encode.signedInt16 BE. | pass | pass | pass | pass |
| DecodeSignedInt32BETest Bytes.Decode.signedInt32 BE reads back a negative value written by Bytes.Encode.signedInt32 BE. | pass | pass | pass | pass |
| DecodeSignedInt8Test Bytes.Decode.signedInt8 reads back a negative value written by Bytes.Encode.signedInt8. | pass | pass | pass | pass |
| DecodeStringEmptyTest Bytes.Decode.string 0 decodes the empty string. | pass | pass | pass | pass |
| DecodeStringNonAsciiTest Bytes.Decode.string round-trips non-ASCII text, and the decoded strings have the right `String.length`. | pass | pass | pass | pass |
| DecodeStringReprMatrixTest Bytes.Decode.string round-trips ASCII strings of several lengths, and String operations on a decoded string agree with the same operations on a literal. | pass | pass | pass | pass |
| DecodeStringTest Bytes.Decode.string reads back a string written by Bytes.Encode.string. | pass | pass | pass | pass |
| DecodeStringUtf8ViewTest A string produced by Bytes.Decode.string behaves like a string literal with the same contents under the String API and as a Dict key. | pass | pass | pass | pass |
| DecodeSucceedTest Bytes.Decode.succeed produces its value without reading the input. | pass | pass | pass | pass |
| DecodeUnsignedInt16BETest Bytes.Decode.unsignedInt16 BE reads back a value written by Bytes.Encode.unsignedInt16 BE. | pass | pass | pass | pass |
| DecodeUnsignedInt16LETest Bytes.Decode.unsignedInt16 LE reads back a value written by Bytes.Encode.unsignedInt16 LE. | pass | pass | pass | pass |
| DecodeUnsignedInt32BETest Bytes.Decode.unsignedInt32 BE reads back a value written by Bytes.Encode.unsignedInt32 BE. | pass | pass | pass | pass |
| DecodeUnsignedInt32LETest Bytes.Decode.unsignedInt32 LE reads back a value written by Bytes.Encode.unsignedInt32 LE. | pass | pass | pass | pass |
| DecodeUnsignedInt8Test Bytes.Decode.unsignedInt8 reads back a byte written by Bytes.Encode.unsignedInt8. | pass | pass | pass | pass |
| DecodedStringAsKeyTest Strings produced by Bytes.Decode.string work as Dict keys that are found by equal strings built without decoding. | pass | pass | pass | pass |
| EncodeBytesTest Bytes.Encode.bytes embeds an existing Bytes value in a new encoding. | pass | pass | pass | pass |
| EncodeDecodeStringAstralTest A string containing a character outside the Basic Multilingual Plane survives a round trip through Bytes.Encode.string and Bytes.Decode.string. | pass | pass | pass | pass |
| EncodeDecodeStringUnicodeContentTest A string with two- and three-byte UTF-8 characters survives a round trip through `Bytes.Encode.string` and `Bytes.Decode.string`. | pass | pass | pass | pass |
| EncodeFloat32BETest `Bytes.Encode.float32` with big-endian order writes 4 bytes. | pass | pass | pass | pass |
| EncodeFloat32LETest `Bytes.Encode.float32` with little-endian order writes 4 bytes. | pass | pass | pass | pass |
| EncodeFloat64BETest `Bytes.Encode.float64` with big-endian order writes 8 bytes. | pass | pass | pass | pass |
| EncodeLargeSequenceTest `Bytes.Encode.sequence` of 100 `unsignedInt8` encoders produces 100 bytes. | pass | pass | pass | pass |
| EncodeNestedSequenceTest A `Bytes.Encode.sequence` that contains other sequences produces the sum of all their widths. | pass | pass | pass | pass |
| EncodeSequenceEmptyTest `Bytes.Encode.sequence []` produces zero bytes. | pass | pass | pass | pass |
| EncodeSequenceTest `Bytes.Encode.sequence` of mixed-width encoders produces the sum of their widths. | pass | pass | pass | pass |
| EncodeSignedInt16BETest `Bytes.Encode.signedInt16` with big-endian order writes 2 bytes for a negative value. | pass | pass | pass | pass |
| EncodeSignedInt32BETest `Bytes.Encode.signedInt32` with big-endian order writes 4 bytes for a negative value. | pass | pass | pass | pass |
| EncodeSignedInt8Test `Bytes.Encode.signedInt8` writes 1 byte for a negative value. | pass | pass | pass | pass |
| EncodeStringEmptyTest `Bytes.Encode.string ""` produces zero bytes. | pass | pass | pass | pass |
| EncodeStringTest `Bytes.Encode.string` writes one byte per ASCII character. | pass | pass | pass | pass |
| EncodeStringUnicodeTest `Bytes.Encode.string` writes a string as UTF-8, so a two-byte character takes two bytes. | pass | pass | pass | pass |
| EncodeUnsignedInt16BETest `Bytes.Encode.unsignedInt16` with big-endian order writes 2 bytes. | pass | pass | pass | pass |
| EncodeUnsignedInt16LETest `Bytes.Encode.unsignedInt16` with little-endian order writes 2 bytes. | pass | pass | pass | pass |
| EncodeUnsignedInt32BETest `Bytes.Encode.unsignedInt32` with big-endian order writes 4 bytes. | pass | pass | pass | pass |
| EncodeUnsignedInt32LETest `Bytes.Encode.unsignedInt32` with little-endian order writes 4 bytes. | pass | pass | pass | pass |
| EncodeUnsignedInt8MaxTest `Bytes.Encode.unsignedInt8` writes 1 byte for its largest value, 255. | pass | pass | pass | pass |
| EncodeUnsignedInt8Test `Bytes.Encode.unsignedInt8` writes 1 byte. | pass | pass | pass | pass |
| EncodeUnsignedInt8ZeroTest `Bytes.Encode.unsignedInt8` writes 1 byte for zero. | pass | pass | pass | pass |
| EndiannessBELETest Encoding a 16-bit unsigned integer in one byte order and decoding it in the other with elm/bytes swaps its two bytes. | pass | pass | pass | pass |
| FloatSpecialValuesTest Positive infinity, negative infinity and zero survive a big-endian `float64` encode and decode with elm/bytes. | pass | pass | pass | pass |
| IntegrationBinaryProtocolTest A small binary message format round-trips through elm/bytes: a version byte, a type byte, a big-endian 16-bit payload length, then the payload bytes. | pass | pass | pass | pass |
| IntegrationConditionalDecodingTest A decoder that reads a tag byte and uses `Bytes.Decode.andThen` to choose between a 32-bit integer and a 64-bit float decodes both variants of a custom type. | pass | pass | pass | pass |
| IntegrationLengthPrefixedStringTest A string prefixed by its length as a big-endian 16-bit integer round-trips through elm/bytes, with `Bytes.Decode.andThen` passing the decoded length to `Bytes.Decode.string`. | pass | pass | pass | pass |
| IntegrationListEncodingTest A list of integers encoded as a one-byte count followed by one byte per element round-trips through elm/bytes. | pass | pass | pass | pass |
| IntegrationMultipleStringsTest Three strings, each prefixed by its length as one byte, are encoded one after another with elm/bytes and decoded back in order. | pass | pass | pass | pass |
| IntegrationNestedStructureTest A record containing another record round-trips through elm/bytes using encoders and decoders composed from per-record parts. | pass | pass | pass | pass |
| IntegrationRecordEncodingTest A record of two bytes and a 32-bit float round-trips through elm/bytes, decoded with `Bytes.Decode.map3`. | pass | pass | pass | pass |
| RoundtripFloat32Test Floats survive a big-endian `float32` encode and decode with elm/bytes to within 0.0001. | pass | pass | pass | pass |
| RoundtripFloat64Test Floats survive a big-endian `float64` encode and decode with elm/bytes exactly. | pass | pass | pass | pass |
| RoundtripMixedTypesTest A sequence of an 8-bit integer, a big-endian 16-bit integer and a big-endian 64-bit float is encoded with elm/bytes and decoded back with `Bytes.Decode.map3`. | pass | pass | pass | pass |
| RoundtripSignedInt16Test Integers survive a big-endian `signedInt16` encode and decode with elm/bytes, including both ends of the signed 16-bit range. | pass | pass | pass | pass |
| RoundtripSignedInt32Test Integers survive a big-endian `signedInt32` encode and decode with elm/bytes, including both ends of the signed 32-bit range. | pass | pass | pass | pass |
| RoundtripSignedInt8Test Integers survive a `signedInt8` encode and decode with elm/bytes, including both ends of the signed 8-bit range. | pass | pass | pass | pass |
| RoundtripStringTest Strings survive an elm/bytes encode and decode when `Bytes.Decode.string` is given the string's length. | pass | pass | pass | pass |
| RoundtripUnsignedInt16Test Integers survive an `unsignedInt16` encode and decode with elm/bytes in both byte orders. | pass | pass | pass | pass |
| RoundtripUnsignedInt32Test Integers survive an `unsignedInt32` encode and decode with elm/bytes in both byte orders. | pass | pass | pass | pass |
| RoundtripUnsignedInt8Test Integers survive an `unsignedInt8` encode and decode with elm/bytes, from 0 up to 255. | pass | pass | pass | pass |
Discussions
Discuss this project·Search the discussions on GitHub
Discussions are on GitHub; one about this project has [p:elm-bytes] in its title.