<commit_before>import "stdlib/string"

func String(s) { new string.String(s) }

const exports = {}

func isTrue(x) {
    if isFunc(x): x = x()
    if !isBool(x): throw "assertion must be a boolean to isTrue"
    if x: return
    throw String("Assertion Failed: Expected {} to be true.").format(x)
}
exports.isTrue = isTrue

func isFalse(x) {
    if isFunc(x): x = x()
    if !isBool(x): throw "assertion must be a boolean to isFalse"
    if !x: return
    throw String("Assertion Failed: Expected {} to be true.").format(x)
}
exports.isFalse = isFalse

func isEq(a, b) {
    if a == b: return
    throw String("Assertion Failed: Expected {} and {} to be equal.").format(a, b)
}
exports.isEq = isEq

func isNeq(a, b) {
    if a != b: return
    throw String("Assertion Failed: Expected {} and {} to not be equal.").format(a, b)
}
exports.isNeq = isNeq

func shouldThrow(fn) {
    if !isFunc(fn): throw "assertion must be a func to shouldThrow"<commit_msg>Use backticks in assert message for empty strings/values<commit_after>import "stdlib/string"

func String(s) { new string.String(s) }

const exports = {}

func isTrue(x) {
    if isFunc(x): x = x()
    if !isBool(x): throw "assertion must be a boolean to isTrue"
    if x: return
    throw String("Assertion Failed: Expected `{}` to be true.").format(x)
}
exports.isTrue = isTrue

func isFalse(x) {
    if isFunc(x): x = x()
    if !isBool(x): throw "assertion must be a boolean to isFalse"
    if !x: return
    throw String("Assertion Failed: Expected `{}` to be true.").format(x)
}
exports.isFalse = isFalse

func isEq(a, b) {
    if a == b: return
    throw String("Assertion Failed: Expected `{}` and `{}` to be equal.").format(a, b)
}
exports.isEq = isEq

func isNeq(a, b) {
    if a != b: return
    throw String("Assertion Failed: Expected `{}` and `{}` to not be equal.").format(a, b)
}
exports.isNeq = isNeq

func shouldThrow(fn) {
    if !isFunc(fn): throw "assertion must be a func to shouldThrow"
{'fraction_non_alphanumeric': 0.14314824248599084, 'fraction_numerical': 0.0, 'mean_word_length': 3.535796766743649, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5254325', 'n_tokens_mistral': 708, 'n_tokens_neox': 689, 'n_words': 232}