Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 864bfd9

Browse files
authored
Add test for closest-android-ancestor
1 parent df40df5 commit 864bfd9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/neko/t_utils.clj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
(ns neko.t-utils
22
(:require [clojure.test :refer :all]
3-
[neko.-utils :as u]))
3+
[neko.-utils :as u])
4+
(:import android.app.Activity
5+
android.widget.LinearLayout))
46

57
(deftest int-id
68
(is (= (u/int-id :foo) (u/int-id :foo)))
@@ -55,3 +57,8 @@
5557
c (System/currentTimeMillis)]
5658
(is (< 300 (- b a)))
5759
(is (> 100 (- c b)))))
60+
61+
(deftest closest-android-ancestor
62+
(let [ctx (Activity.)]
63+
(is (= (u/closest-android-ancestor (class (proxy [LinearLayout] [ctx])))
64+
android.widget.LinearLayout))))

0 commit comments

Comments
 (0)