Home / Function/ testWriteUtf8InvalidEndOnTrailingSurrogate() — netty Function Reference

testWriteUtf8InvalidEndOnTrailingSurrogate() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/ByteBufUtilTest.java lines 660–676

    @ParameterizedTest(name = PARAMETERIZED_NAME)
    @MethodSource("noUnsafe")
    public void testWriteUtf8InvalidEndOnTrailingSurrogate(BufferType bufferType) {
        String surrogateString = new StringBuilder(2)
                                .append('\uDC00')
                                .toString();
        ByteBuf buf = buffer(bufferType, 16);
        buf.writeBytes(surrogateString.getBytes(CharsetUtil.UTF_8));
        ByteBuf buf2 = buffer(bufferType, 16);
        ByteBufUtil.writeUtf8(buf2, surrogateString);

        assertEquals(buf, buf2);
        assertEquals(buf.readableBytes(), ByteBufUtil.utf8Bytes(surrogateString));

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free