Home / Function/ testWrapFloat() — netty Function Reference

testWrapFloat() — netty Function Reference

Architecture documentation for the testWrapFloat() function in UnpooledTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7ce770c5_85a1_2728_47b0_208792afea79["testWrapFloat()"]
  57588d83_f329_0d85_cfc5_eea9b8d43e8f["UnpooledTest"]
  7ce770c5_85a1_2728_47b0_208792afea79 -->|defined in| 57588d83_f329_0d85_cfc5_eea9b8d43e8f
  style 7ce770c5_85a1_2728_47b0_208792afea79 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/UnpooledTest.java lines 627–643

    @Test
    public void testWrapFloat() {
        ByteBuf buffer = copyFloat(1, 4);
        assertEquals(8, buffer.capacity());
        assertEquals(1, buffer.readFloat(), 0.01);
        assertEquals(4, buffer.readFloat(), 0.01);
        assertFalse(buffer.isReadable());
        buffer.release();

        buffer = copyFloat(null);
        assertEquals(0, buffer.capacity());
        buffer.release();

        buffer = copyFloat(new float[] {});
        assertEquals(0, buffer.capacity());
        buffer.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testWrapFloat() do?
testWrapFloat() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/UnpooledTest.java.
Where is testWrapFloat() defined?
testWrapFloat() is defined in buffer/src/test/java/io/netty/buffer/UnpooledTest.java at line 627.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free