Home / Function/ testWriteUsAsciiString() — netty Function Reference

testWriteUsAsciiString() — netty Function Reference

Architecture documentation for the testWriteUsAsciiString() function in ByteBufUtilTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ac4bbc99_b1b5_662d_a483_27f97ad5527e["testWriteUsAsciiString()"]
  1b32157c_4c5c_4c3c_706b_1a74a9afdca7["ByteBufUtilTest"]
  ac4bbc99_b1b5_662d_a483_27f97ad5527e -->|defined in| 1b32157c_4c5c_4c3c_706b_1a74a9afdca7
  style ac4bbc99_b1b5_662d_a483_27f97ad5527e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/ByteBufUtilTest.java lines 678–692

    @ParameterizedTest(name = PARAMETERIZED_NAME)
    @MethodSource("noUnsafe")
    public void testWriteUsAsciiString(BufferType bufferType) {
        AsciiString usAscii = new AsciiString("NettyRocks");
        int expectedCapacity = usAscii.length();
        ByteBuf buf = buffer(bufferType, expectedCapacity);
        buf.writeBytes(usAscii.toString().getBytes(CharsetUtil.US_ASCII));
        ByteBuf buf2 = buffer(bufferType, expectedCapacity);
        ByteBufUtil.writeAscii(buf2, usAscii);

        assertEquals(buf, buf2);

        buf.release();
        buf2.release();
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free