Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequentially usage of bits8 during encoding produce incorrect flat. #17

Open
rssh opened this issue Oct 20, 2024 · 0 comments
Open

sequentially usage of bits8 during encoding produce incorrect flat. #17

rssh opened this issue Oct 20, 2024 · 0 comments

Comments

@rssh
Copy link
Collaborator

rssh commented Oct 20, 2024

Next test illustrate this:

test("encode/decode numeric analog of SIRType Fun[Int,Fun[Int,Int]]") {
        val enc = new EncoderState(20)
        enc.bits(4,8)
        enc.bits(4,1)
        enc.bits(4,8)
        enc.bits(4,1)
        enc.bits(4,1)
        val decoder = new DecoderState(enc.buffer)
        val t1 = decoder.bits8(4)
        assert(t1 == 8)
        val t2 = decoder.bits8(4)
        assert(t2 == 1)
        val t3 = decoder.bits8(4)
        assert(t3 == 8)
        val t4 = decoder.bits8(4)
        assert(t4 == 1)
        val t5 = decoder.bits8(4)
        assert(t5 == 1)
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant