describe "chaining comparison", -> it "should support simple chaining", -> assert.is_true 1 < 2 < 3 assert.is_true 1 <= 2 <= 3 assert.is_true 3 > 2 > 1 assert.is_true 3 >= 2 >= 1 it "should support complex chaining", -> assert.is_true 1 < 2 <= 2 < 3 == 3 > 2 >= 1 == 1 < 3 ~= 5 it "should work with variables", -> a = 5 assert.is_true 1 <= a <= 10 assert.is_true a >= 3 assert.is_true a <= 10 it "should handle mixed comparisons", -> x = 5 assert.is_true 1 < x < 10 assert.is_true 1 <= x <= 5 it "should work with string comparisons", -> assert.is_true "a" < "b" < "c" assert.is_true "a" <= "b" <= "c" it "should handle edge cases", -> assert.is_true 0 <= 0 <= 0 assert.is_true -5 < 0 < 5 it "should work in expressions", -> result = if 1 < 2 < 3 "yes" else "no" assert.same result, "yes" it "should support != operator", -> assert.is_true 1 != 2 != 3 assert.is_true 1 ~= 2 ~= 3 it "should handle boolean results", -> assert.is_true 1 < 2 < 3 assert.is_false 3 < 2 < 1 it "should work with function calls", -> v = (x) -> x assert.is_true v(1) < v(2) < v(3) it "should handle negation", -> assert.is_true -10 < -5 < 0 it "should support mixed operators", -> assert.is_true 1 < 2 <= 2 < 3 assert.is_true 3 > 2 >= 2 > 1