@@ -25,12 +25,12 @@ UTEST( shape_cache_eviction, evicted_entry_is_reshaped )
2525
2626 // Now draw the first string again (should have been evicted)
2727 ASSERT_TRUE ( vefc_test::draw_text ( ctx, font, strings[ 0 ] ) );
28- vefc_test::flush ( ctx );
2928
3029 auto * drawlist = vefc_test::current_drawlist ( ctx );
3130 EXPECT_GT ( drawlist->dcalls .size (), 0u );
3231 EXPECT_TRUE ( vefc_test::all_indices_in_range ( *drawlist ) );
3332 EXPECT_TRUE ( vefc_test::all_vertices_finite ( *drawlist ) );
33+ vefc_test::flush ( ctx );
3434
3535 // Verify cursor position is valid after reshaping
3636 EXPECT_NE ( ctx.cache .cursor_pos .x , -1 .0f );
@@ -77,12 +77,11 @@ UTEST( shape_cache_eviction, next_cache_idx_wraps )
7777
7878 ASSERT_GE ( font, 0 );
7979
80- uint32_t initial_next_idx = ctx.cache .shape_cache .next_cache_idx ;
81-
8280 // Draw unique strings until we fill the cache
8381 for ( int i = 0 ; i < VE_FONTCACHE_SHAPECACHE_SIZE; i++ ) {
84- std::u8string label = vefc_test::make_ascii_string ( static_cast < size_t >( i + 500 ) );
85- ASSERT_TRUE ( vefc_test::draw_text ( ctx, font, label ) );
82+ std::string label = " shape-fill-" + std::to_string ( i );
83+ std::u8string text = vefc_test::to_u8string ( label );
84+ ASSERT_TRUE ( vefc_test::draw_text ( ctx, font, text ) );
8685 vefc_test::flush ( ctx );
8786
8887 EXPECT_LE ( ctx.cache .shape_cache .next_cache_idx , VE_FONTCACHE_SHAPECACHE_SIZE );
@@ -94,8 +93,9 @@ UTEST( shape_cache_eviction, next_cache_idx_wraps )
9493
9594 // Draw more strings - verify next_cache_idx doesn't exceed size (it wraps/reuses slots)
9695 for ( int i = 0 ; i < 50 ; i++ ) {
97- std::u8string label = vefc_test::make_ascii_string ( static_cast < size_t >( i + 10000 ) );
98- ASSERT_TRUE ( vefc_test::draw_text ( ctx, font, label ) );
96+ std::string label = " shape-wrap-" + std::to_string ( i );
97+ std::u8string text = vefc_test::to_u8string ( label );
98+ ASSERT_TRUE ( vefc_test::draw_text ( ctx, font, text ) );
9999 vefc_test::flush ( ctx );
100100
101101 EXPECT_LE ( ctx.cache .shape_cache .next_cache_idx , VE_FONTCACHE_SHAPECACHE_SIZE );
0 commit comments