Skip to content

Commit

Permalink
[update]関数名修正
Browse files Browse the repository at this point in the history
  • Loading branch information
jiro4989 committed Nov 17, 2018
1 parent 18b7038 commit 8db23bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject meme "1.0.2-SNAPSHOT"
(defproject meme "1.0.3-SNAPSHOT"
:description "meme is naming tool like linux commands."
:url "https://github.com/jiro4989/meme"
:plugins [[lein-kibit "0.1.6"]]
Expand Down
4 changes: 2 additions & 2 deletions src/meme/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
none (format "%s" n)
:else (format (str "%" padding-size "d" delimiter "%s") weight n))))

(defn weighting-words
(defn weight-words
"コマンド名候補リストに重みを付けてマップとして返す"
[round-words common-words]
(->> round-words
Expand Down Expand Up @@ -67,5 +67,5 @@
:else (let [words (str/split (first arguments) #"\s")
common-words (read-words "resources/word.txt")
round-words (word/round-robin-words words (:round-prefix-chars-size options))]
(doseq [m (weighting-words round-words common-words)]
(doseq [m (weight-words round-words common-words)]
(println (format-line m options)))))))
8 changes: 4 additions & 4 deletions test/meme/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
(is (= " 1,cat" (format-line m {:none false :padding-size 3 :delimiter ","}))))
))

(deftest test-weighting-words
(testing "weighting-wordsは"
(deftest test-weight-words
(testing "weight-wordsは"
(testing "重みを付けて返す"
(is (= [{:weight 7 :name "grep"}] (weighting-words ["grep"] []))))
(is (= [{:weight 7 :name "grep"}] (weight-words ["grep"] []))))
(testing "常用英単語に同名のものがあれば重みがつく"
(is (= [{:weight 7 :name "ab"} {:weight 12 :name "grep"}] (weighting-words ["grep" "ab"] ["grep"]))))
(is (= [{:weight 7 :name "ab"} {:weight 12 :name "grep"}] (weight-words ["grep" "ab"] ["grep"]))))
))

(deftest test-main
Expand Down

0 comments on commit 8db23bb

Please sign in to comment.