<commit_before>(ns bluebell.fibers.ops-test
  (:refer-clojure :exclude [+ - / * inc dec])
  (:require [bluebell.fibers.ops :refer :all :as ops]
            [bluebell.fibers.types :as types]
            [bluebell.fibers.core :as core]
            [clojure.test :refer :all]
            [clojure.spec.alpha :as spec]
            [bluebell.utils.core :as utils]))

(deftest add-test
  (is (+ (types/primitive :double 3)
         (types/primitive :long 9)))
  (is (= (core/make-node (+ (types/primitive :double 3)) ['kattskit])
         '(clojure.core/unchecked-add kattskit)))
  (is (= (core/make-node (+ (types/primitive :double 3)
                            (types/primitive :int 9)) ['a 'b])
         '(clojure.core/unchecked-add a b))))

(deftest add-test-eval
  (is (= 7 (utils/macro-eval 
            (core/make-code (+ (types/primitive :double 3)
                               (types/primitive :double 4))))))
  (is (= 12 (core/expand
             (* (types/primitive :double 3)
                (types/primitive :double 4))))))

(deftest nested-add
  (is (= 7 (utils/macro-eval
            (core/make-code (+ (+ (types/input 3)
                                  (types/input 2))
                               (types/input 2)))))))<commit_msg>working on an if<commit_after>(ns bluebell.fibers.ops-test
  (:refer-clojure :exclude [+ - / * inc dec])
  (:require [bluebell.fibers.ops :refer :all :as ops]
            [bluebell.fibers.types :as types]
            [bluebell.fibers.core :as core]
            [clojure.test :refer :all]
            [bluebell.utils.access :as access]
            [clojure.spec.alpha :as spec]
            [bluebell.utils.core :as utils]))

(deftest add-test
  (is (+ (types/primitive :double 3)
         (types/primitive :long 9)))
  (is (= (core/make-node (+ (types/primitive :double 3)) ['kattskit])
         '(clojure.core/unchecked-add kattskit)))
  (is (= (core/make-node (+ (types/primitive :double 3)
                            (types/primitive :int 9)) ['a 'b])
         '(clojure.core/unchecked-add a b))))

(deftest add-test-eval
  (is (= 7 (utils/macro-eval 
            (core/make-code (+ (types/primitive :double 3)
                               (types/primitive :double 4))))))
  (is (= 12 (core/expand
             (* (types/primitive :double 3)
                (types/primitive :double 4))))))

(deftest nested-add
  (is (= 7 (utils/macro-eval
            (core/make-code (+ (+ (types/input 3)
                                  (types/input 2))
                               (types/input 2)))))))

(defn static-if [cond true-branch false-branch]
  (core/node
   (access/build core/-datatype :unspecified)))

(comment
  (core/make-map {}
                 (static-if (types/input 1)
                            (types/input 2)
                            (types/input 3)))

  )

{'fraction_non_alphanumeric': 0.15806223479490805, 'fraction_numerical': 0.012376237623762377, 'mean_word_length': 1.7681017612524461, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7568789', 'n_tokens_mistral': 979, 'n_tokens_neox': 910, 'n_words': 203}