<commit_before>
(describe frame-rendering
          (== (str (make-frame a: 1)) "{a: 1}"))

(describe naked-symbols
          (== a: 'a:))

(describe frame-access
          (== (get-slot {a: 1 b: 2 c: 3} a:) 1)
          (== (get-slot {a: 1 b: 2 c: 3} b:) 2))

(describe frame-mutation
          (let ((f {a: 1 b: 2 c: 3}))
            (== (set-slot! f a: 5) 5)
            (== (get-slot f a:) 5)))

(describe frame-method
          (let ((f {a: 5
                    b: 2
                    foo: (lambda (x)
                           (+ x a))}))
            (== (send f foo: 1) 6))
          (let ((f {a: 5
                    b: 2
                    foo: (lambda (x)
                           (set! b (+ x a)))}))
            (== (send f foo: 1) 6)
            (== (get-slot f b:) 6)))

(describe prototypes
          (let* ((f {a: 2
                     b: 1})
                 (g {parent*: f
                     a: 3}))
            (== (get-slot g b:) 1)
            (== (get-slot g a:) 3)
            (set-slot! g a: 1)
            (== (get-slot g a:) 1)
            (set-slot! g b: 10)
            (== (get-slot g b:) 10))
          (let* ((adder {add: (lambda (x)
                                (+ x a))})
                 (incrementor {parent*: adder
                               a: 1}))
            (== (send incrementor add: 3) 4)))

(describe new-slots
          (let ((f {a: 1}))
            (== (set-slot! f b: 5) 5)
            (== (get-slot f b:) 5)))

(describe function-slot-use
          (let ((f {a: 5
                    b: 2
                    foo: (lambda (x)
                           (+ x a))
                    bar: (lambda ()
                           (foo b))}))
            (== (send f bar:) 7)
            (== (bar:> f) 7)))

(describe inherited-function-slot-use
          (let* ((f {a: 5
                     foo: (lambda (x)
                            (+ x a))})
                 (g {parent*: f
                     b: 2
                     bar: (lambda ()
                            (foo b))}))
            (== (send g bar:) 7)))

(describe multiple-parents
          (let* ((e {a: 5})
                 (f {b: 2})
                 (g {parent-e*: e
                     parent-f*: f
                     foo: (lambda (x)
                            (+ x a))
                     bar: (lambda ()
                            (foo b))}))
            (== (send g bar:) 7)
            (set-slot! g a: 10)
            (== (get-slot g a:) 10)
            (== (get-slot e a:) 5)))

(describe calling-super
          (let* ((f {foo: (lambda () 42)})
                 (g {parent*: f  foo: (lambda () (+ 1 (send-super foo:)))}))
            (== (send g foo:) 43)))

(describe calling-super-sugar
          (let ((f {foo: (lambda () 42)})
                (g {parent*: f  foo: (lambda () (+ 1 (foo:^)))}))<commit_msg>Fix test... needed to be let*.<commit_after>
(describe frame-rendering
          (== (str (make-frame a: 1)) "{a: 1}"))

(describe naked-symbols
          (== a: 'a:))

(describe frame-access
          (== (get-slot {a: 1 b: 2 c: 3} a:) 1)
          (== (get-slot {a: 1 b: 2 c: 3} b:) 2))

(describe frame-mutation
          (let ((f {a: 1 b: 2 c: 3}))
            (== (set-slot! f a: 5) 5)
            (== (get-slot f a:) 5)))

(describe frame-method
          (let ((f {a: 5
                    b: 2
                    foo: (lambda (x)
                           (+ x a))}))
            (== (send f foo: 1) 6))
          (let ((f {a: 5
                    b: 2
                    foo: (lambda (x)
                           (set! b (+ x a)))}))
            (== (send f foo: 1) 6)
            (== (get-slot f b:) 6)))

(describe prototypes
          (let* ((f {a: 2
                     b: 1})
                 (g {parent*: f
                     a: 3}))
            (== (get-slot g b:) 1)
            (== (get-slot g a:) 3)
            (set-slot! g a: 1)
            (== (get-slot g a:) 1)
            (set-slot! g b: 10)
            (== (get-slot g b:) 10))
          (let* ((adder {add: (lambda (x)
                                (+ x a))})
                 (incrementor {parent*: adder
                               a: 1}))
            (== (send incrementor add: 3) 4)))

(describe new-slots
          (let ((f {a: 1}))
            (== (set-slot! f b: 5) 5)
            (== (get-slot f b:) 5)))

(describe function-slot-use
          (let ((f {a: 5
                    b: 2
                    foo: (lambda (x)
                           (+ x a))
                    bar: (lambda ()
                           (foo b))}))
            (== (send f bar:) 7)
            (== (bar:> f) 7)))

(describe inherited-function-slot-use
          (let* ((f {a: 5
                     foo: (lambda (x)
                            (+ x a))})
                 (g {parent*: f
                     b: 2
                     bar: (lambda ()
                            (foo b))}))
            (== (send g bar:) 7)))

(describe multiple-parents
          (let* ((e {a: 5})
                 (f {b: 2})
                 (g {parent-e*: e
                     parent-f*: f
                     foo: (lambda (x)
                            (+ x a))
                     bar: (lambda ()
                            (foo b))}))
            (== (send g bar:) 7)
            (set-slot! g a: 10)
            (== (get-slot g a:) 10)
            (== (get-slot e a:) 5)))

(describe calling-super
          (let* ((f {foo: (lambda () 42)})
                 (g {parent*: f  foo: (lambda () (+ 1 (send-super foo:)))}))
            (== (send g foo:) 43)))

(describe calling-super-sugar
          (let* ((f {foo: (lambda () 42)})
                 (g {parent*: f  foo: (lambda () (+ 1 (foo:^)))}))
{'fraction_non_alphanumeric': 0.17968886558294003, 'fraction_numerical': 0.023072889355007866, 'mean_word_length': 0.9143526262964202, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7180800', 'n_tokens_mistral': 1990, 'n_tokens_neox': 1762, 'n_words': 566}