@@ -361,28 +361,49 @@ g1["a"] = t1a
361361g1[" b" ] = t1b
362362g1[" c" ] = tc
363363
364- @test sprint (show, g1) == """
364+ # Test full output (order-independent)
365+ output_full = sprint (show, g1)
366+ @test startswith (
367+ output_full,
368+ """
3653693-element BenchmarkTools.BenchmarkGroup:
366370 tags: ["1", "2"]
367- "c" => TrialEstimate(1.000 ns)
368- "b" => TrialEstimate(4.123 μs)
369- "a" => TrialEstimate(32.000 ns)"""
370- @test sprint (show, g1; context= :boundto => 1 ) == """
371+ """ ,
372+ )
373+ @test occursin (" \" a\" => TrialEstimate(32.000 ns)" , output_full)
374+ @test occursin (" \" b\" => TrialEstimate(4.123 μs)" , output_full)
375+ @test occursin (" \" c\" => TrialEstimate(1.000 ns)" , output_full)
376+
377+ # Test boundto context output
378+ output_boundto = sprint (show, g1; context= :boundto => 1 )
379+ @test startswith (
380+ output_boundto,
381+ """
3713823-element BenchmarkTools.BenchmarkGroup:
372383 tags: ["1", "2"]
373- "c" => TrialEstimate(1.000 ns)
374- ⋮"""
375- @test sprint (show, g1; context= :limit => false ) == """
384+ """ ,
385+ )
386+
387+ # Test limit => false output (order-independent)
388+ output_no_limit = sprint (show, g1; context= :limit => false )
389+ @test startswith (output_no_limit, """
3763903-element BenchmarkTools.BenchmarkGroup:
377391 tags: ["1", "2"]
378- "c" => TrialEstimate(1.000 ns)
379- "b" => TrialEstimate(4.123 μs)
380- "a" => TrialEstimate(32.000 ns)"""
381- @test @test_deprecated (sprint (show, g1; context= :limit => 1 )) == """
392+ """
393+ )
394+ @test occursin (" \" a\" => TrialEstimate(32.000 ns)" , output_no_limit)
395+ @test occursin (" \" b\" => TrialEstimate(4.123 μs)" , output_no_limit)
396+ @test occursin (" \" c\" => TrialEstimate(1.000 ns)" , output_no_limit)
397+
398+ # Test deprecated limit context output
399+ output_limit_deprecated = @test_deprecated (sprint (show, g1; context= :limit => 1 ))
400+ @test startswith (
401+ output_limit_deprecated,
402+ """
3824033-element BenchmarkTools.BenchmarkGroup:
383404 tags: ["1", "2"]
384- "c" => TrialEstimate(1.000 ns)
385- ⋮ """
405+ """ ,
406+ )
386407
387408# EasyConfig-style benchmark groups #
388409# -----------------------------------#
0 commit comments