<commit_before>import XCTest
import Song

class FunctionTests: XCTestCase {

    let namedFunction = Expression.Function(name: "foo", parameters: ["a", "b"], body: Expression.Variable("x"))
    let anonymousFunction = Expression.Function(name: nil, parameters: ["a", "b"], body: Expression.Variable("x"))

    func testDescriptionNamedFunction() {
        let result = "\(namedFunction)"
        XCTAssertEqual("def foo(a, b) { x }", result)
    }

    func testEvaluateNamedFunction() {
        let context = ["x": Expression.IntegerValue(5)]
        let result = namedFunction.evaluate(context)
        let closure = Expression.Closure(function: namedFunction, context: context)
        XCTAssertEqual(closure, result)
    }
    
    func testEvaluateAnonymousFunction() {
        let result = "\(anonymousFunction)"
        XCTAssertEqual("lambda(a, b) { x }", result)
    }
}<commit_msg>Fix typo.<commit_after>import XCTest
import Song

class FunctionTests: XCTestCase {

    let namedFunction = Expression.Function(name: "foo", parameters: ["a", "b"], body: Expression.Variable("x"))
    let anonymousFunction = Expression.Function(name: nil, parameters: ["a", "b"], body: Expression.Variable("x"))

    func testDescriptionNamedFunction() {
        let result = "\(namedFunction)"
        XCTAssertEqual("def foo(a, b) { x }", result)
    }

    func testEvaluateNamedFunction() {
        let context = ["x": Expression.IntegerValue(5)]
        let result = namedFunction.evaluate(context)
        let closure = Expression.Closure(function: namedFunction, context: context)
        XCTAssertEqual(closure, result)
    }
    
    func testDescriptionAnonymousFunction() {
        let result = "\(anonymousFunction)"
        XCTAssertEqual("lambda(a, b) { x }", result)
    }
}
{'fraction_non_alphanumeric': 0.13194834362717575, 'fraction_numerical': 0.0011229646266142617, 'mean_word_length': 3.5809768637532136, 'pattern_counts': {'":': 2, '<': 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': '1335733', 'n_tokens_mistral': 506, 'n_tokens_neox': 489, 'n_words': 123}