Skip to content

Commit d931c6e

Browse files
committed
test(oracle): add strict combo probes (batches 112-113), thread/mutex/finalizer + category/display/string-props/bool-vector/coding-plist at parity
Two new divergence_combo_strict_* probe files (9 tests) for thread/mutex API (batch 112) and category table deep operations (define-category, modify-category- entry, category-docstring/set-mnemonics), display property variants (space :width/ :align-to, margin, display string), string text-properties vs buffer text-properties comparison, bool-vector large ops (intersection/union/complement/subsetp on 100- element vectors), and coding-system-plist all keys (batch 113). All run via cargo nextest with NEOVM_ORACLE_MODE=live. All 9 are parity locks. cargo fmt --all and cargo check --workspace are clean.
1 parent ad433db commit d931c6e

2 files changed

Lines changed: 98 additions & 0 deletions

File tree

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
//! Strict combo oracle probes, batch 113: category table deep operations,
2+
//! display property variants (space/align-to/margin), string vs buffer
3+
//! text-property interaction, and bool-vector on large vectors.
4+
//!
5+
//! Tests are parity locks unless annotated with a surfaced divergence.
6+
7+
use super::common::assert_oracle_parity;
8+
use super::common::return_if_neovm_enable_oracle_proptest_not_set;
9+
10+
#[test]
11+
fn div_s7_category_table_deep_ops() {
12+
return_if_neovm_enable_oracle_proptest_not_set!();
13+
assert_oracle_parity(
14+
r####"
15+
(let ((ct (make-category-table)))
16+
(define-category ?p "probe category" ct)
17+
(modify-category-entry ?a ?p ct)
18+
(modify-category-entry ?b ?p ct)
19+
(list (category-docstring ?p ct)
20+
(aref ct ?a)
21+
(aref ct ?b)
22+
(aref ct ?c)
23+
(category-set-mnemonics (aref ct ?a))
24+
(char-table-p ct)
25+
(char-table-subtype ct)))
26+
"####,
27+
);
28+
}
29+
30+
#[test]
31+
fn div_s7_display_property_string_width_variants() {
32+
return_if_neovm_enable_oracle_proptest_not_set!();
33+
assert_oracle_parity(
34+
r####"
35+
(list (string-width (propertize "x" 'display '(space :width 5)))
36+
(string-width (propertize "x" 'display '(space :align-to 10)))
37+
(string-width (propertize "x" 'display "YYY"))
38+
(string-width (propertize "x" 'display '(margin left-margin)))
39+
(string-width (propertize "abc" 'display "XY")))
40+
"####,
41+
);
42+
}
43+
44+
#[test]
45+
fn div_s7_string_props_vs_buffer_text_props() {
46+
return_if_neovm_enable_oracle_proptest_not_set!();
47+
assert_oracle_parity(
48+
r####"
49+
(let ((s1 (propertize "hello" 'face 'bold 'rear-nonsticky t))
50+
(s2 #("world" 0 3 (face italic) 3 5 (face underline))))
51+
(list (text-properties-at 0 s1)
52+
(text-properties-at 4 s1)
53+
(text-properties-at 0 s2)
54+
(text-properties-at 3 s2)
55+
(text-properties-at 4 s2)
56+
(next-single-property-change 0 'face s1)
57+
(next-single-property-change 0 'face s2)))
58+
"####,
59+
);
60+
}
61+
62+
#[test]
63+
fn div_s7_bool_vector_large_ops() {
64+
return_if_neovm_enable_oracle_proptest_not_set!();
65+
assert_oracle_parity(
66+
r####"
67+
(let ((a (make-bool-vector 100 nil))
68+
(b (make-bool-vector 100 nil)))
69+
(dotimes (i 100)
70+
(when (= (% i 2) 0) (aset a i t))
71+
(when (= (% i 3) 0) (aset b i t)))
72+
(let ((inter (bool-vector-intersection a b))
73+
(union (bool-vector-union a b))
74+
(compl (bool-vector-complement a)))
75+
(list (bool-vector-count-set-bits inter)
76+
(bool-vector-count-set-bits union)
77+
(bool-vector-count-set-bits compl)
78+
(bool-vector-subsetp inter union))))
79+
"####,
80+
);
81+
}
82+
83+
#[test]
84+
fn div_s7_coding_system_plist_all_keys() {
85+
return_if_neovm_enable_oracle_proptest_not_set!();
86+
assert_oracle_parity(
87+
r####"
88+
(let ((pl (coding-system-plist 'utf-8)))
89+
(list (plist-get pl :name)
90+
(plist-get pl :mime-charset)
91+
(plist-get pl :coding-type)
92+
(plist-get pl :ascii-compatible-p)
93+
(plist-get pl :eol-type)
94+
(plist-get pl :charset-list)))
95+
"####,
96+
);
97+
}

neovm-oracle-tests/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,7 @@ mod divergence_combo_strict_bidi_direction_float_edge;
23082308
mod divergence_combo_strict_buffer_undo_marker_textprop_combo_deep;
23092309
mod divergence_combo_strict_byte_compile_results;
23102310
mod divergence_combo_strict_case_conversion_unicode;
2311+
mod divergence_combo_strict_category_table_display_property_string_props_deep;
23112312
mod divergence_combo_strict_char_float_defstruct_misc;
23122313
mod divergence_combo_strict_charprop_search_fontlock_page;
23132314
mod divergence_combo_strict_chartab_syntax_time_quoting;

0 commit comments

Comments
 (0)