<commit_before>(ns icfp2015.unit-test
  (:require [clojure.test :refer :all]
            [icfp2015.unit :refer :all]))

(deftest translation-test
  (testing "translate west"
    (let [unit { :members #{ [0 1] [1 1] } :pivot [0 1] }
          f (translate :west)
          actual-unit (f unit)
          expected-unit { :members #{ [0 0] [1 0] } :pivot [0 0] }]
      (is (= expected-unit actual-unit))))

  (testing "translate east"
    (let [unit { :members #{ [0 1] [1 1] } :pivot [0 1] }
          f (translate :east)
          actual-unit (f unit)
          expected-unit { :members #{ [0 2] [1 2] } :pivot [0 2] }]
      (is (= expected-unit actual-unit))))

  (testing "translate even row southwest"
    (let [unit { :members #{ [0 1] [0 2] } :pivot [0 1] }
          f (translate :southwest)
          actual-unit (f unit)
          expected-unit { :members #{ [1 0] [1 1] } :pivot [1 0] }]
      (is (= expected-unit actual-unit))))

  (testing "translate even row southeast"
    (let [unit { :members #{ [0 0] [0 1] } :pivot [0 1] }
          f (translate :southeast)
          actual-unit (f unit)
          expected-unit { :members #{ [1 0] [1 1] } :pivot [1 1] }]
      (is (= expected-unit actual-unit)))))
<commit_msg>cjl - More translation tests<commit_after>(ns icfp2015.unit-test
  (:require [clojure.test :refer :all]
            [icfp2015.unit :refer :all]))

(deftest translation-test
  (testing "translate west"
    (let [unit { :members #{ [0 1] [1 1] } :pivot [0 1] }
          f (translate :west)
          actual-unit (f unit)
          expected-unit { :members #{ [0 0] [1 0] } :pivot [0 0] }]
      (is (= expected-unit actual-unit))))

  (testing "translate east"
    (let [unit { :members #{ [0 1] [1 1] } :pivot [0 1] }
          f (translate :east)
          actual-unit (f unit)
          expected-unit { :members #{ [0 2] [1 2] } :pivot [0 2] }]
      (is (= expected-unit actual-unit))))

  (testing "translate even row southwest"
    (let [unit { :members #{ [0 1] [0 2] } :pivot [0 1] }
          f (translate :southwest)
          actual-unit (f unit)
          expected-unit { :members #{ [1 0] [1 1] } :pivot [1 0] }]
      (is (= expected-unit actual-unit))))

  (testing "translate odd row southwest"
    (let [unit { :members #{ [1 1] [1 2] } :pivot [1 1] }
          f (translate :southwest)
          actual-unit (f unit)
          expected-unit { :members #{ [2 1] [2 2 ] } :pivot [2 1] }]
      (is (= expected-unit actual-unit))))

  (testing "translate even row southeast"
    (let [unit { :members #{ [0 0] [0 1] } :pivot [0 1] }
          f (translate :southeast)
          actual-unit (f unit)
          expected-unit { :members #{ [1 0] [1 1] } :pivot [1 1] }]
      (is (= expected-unit actual-unit))))

  (testing "translate odd row southeast"
    (let [unit { :members #{ [1 0] [1 1] } :pivot [1 1] }
          f (translate :southeast)
          actual-unit (f unit)
          expected-unit { :members #{ [2 1] [2 2] } :pivot [2 2] }]
      (is (= expected-unit actual-unit)))))

{'fraction_non_alphanumeric': 0.17369808833223468, 'fraction_numerical': 0.04482531311799604, 'mean_word_length': 2.198103266596417, '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': '7030080', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1047, 'n_words': 347}