// Runtime type error tests — verify each type mismatch disrupts correctly
return {
  test_text_plus_array_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = "hello" + [1, 2, 3]
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "text + array should disrupt"
  },

  test_number_plus_text_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = 1 + "hello"
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "number + text should disrupt"
  },

  test_number_plus_array_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = 1 + [1, 2]
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "number + array should disrupt"
  },

  test_text_multiply_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = "hello" * 2
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "text * number should disrupt"
  },

  test_text_divide_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = "hello" / 2
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "text / number should disrupt"
  },

  test_text_modulo_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = "hello" % 2
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "text % number should disrupt"
  },

  test_array_subtract_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = [1] - 2
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "array - number should disrupt"
  },

  test_negate_text_disrupts: function() {
    var caught = false
    var s = "hello"
    var fn = function() {
      return -s
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "negate text should disrupt"
  },

  test_push_on_non_array_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = "hello"
      x[] = 1
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "push on non-array should disrupt"
  },

  test_pop_on_non_array_disrupts: function() {
    var caught = false
    var s = "hello"
    var fn = function() {
      var v = s[]
      return v
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "pop on non-array should disrupt"
  },

  test_comparison_type_mismatch_disrupts: function() {
    var caught = false
    var fn = function() {
      var x = "hello" < [1]
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "text < array should disrupt"
  },

  test_explicit_disrupt_works: function() {
    var caught = false
    var fn = function() {
      disrupt
    } disruption {
      caught = true
    }
    fn()
    if (!caught) return "explicit disrupt should be caught"
  },

  test_valid_add_text: function() {
    var x = "hello" + " world"
    if (x != "hello world") return "text + text should work"
  },

  test_valid_add_numbers: function() {
    var x = 1 + 2
    if (x != 3) return "number + number should work"
  },

  test_valid_comparison: function() {
    if (!(1 < 2)) return "1 < 2 should be true"
    if (!("a" < "b")) return "a < b should be true"
  }
}
