@@ -38,36 +38,6 @@ struct CommandPaletteFilterTests {
3838 #expect( results == [ byTitle, bySubtitle, byDescription] )
3939 }
4040
41- /// A strong color match outranks any text match.
42- @Test func colorMatchOutranksTextMatch( ) {
43- let byColor = option ( title: " Alpha " , leadingColor: . red)
44- let byTitle = option ( title: " Reduce Motion " )
45-
46- let results = [ byTitle, byColor] . filteredAndSorted ( query: " red " )
47-
48- #expect( results == [ byColor, byTitle] )
49- }
50-
51- /// Even a barely-matching color outranks a text match, and the option
52- /// is not dropped from the results. (A previous integer-based score
53- /// truncated weak color matches to 0-3, colliding with the text tiers.)
54- @Test func weakColorMatchOutranksTextMatchAndIsKept( ) throws {
55- // Weighted distance to the Apple color list's red is just under the
56- // 1.5 match threshold, producing a color score near 0.
57- let weakColor = Color ( red: 0.31 , green: 0.49 , blue: 0.49 )
58- let byColor = option ( title: " Alpha " , leadingColor: weakColor)
59- let byTitle = option ( title: " Reduce Motion " )
60-
61- // Sanity-check the fixture: the color must match, but only weakly.
62- let match = try #require( CommandOptionMatch ( option: byColor, query: " red " ) )
63- #expect( match. colorScore > 0 )
64- #expect( match. colorScore < 0.05 )
65-
66- let results = [ byTitle, byColor] . filteredAndSorted ( query: " red " )
67-
68- #expect( results == [ byColor, byTitle] )
69- }
70-
7141 /// Options with equal scores keep their original relative order.
7242 @Test func tiesPreserveOriginalOrder( ) {
7343 let first = option ( title: " New Window " )
0 commit comments