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

Add test for closest-android-ancestor #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/neko/t_utils.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
(ns neko.t-utils
(:require [clojure.test :refer :all]
[neko.-utils :as u]))
[neko.-utils :as u])
(:import android.app.Activity
android.widget.LinearLayout))

(deftest int-id
(is (= (u/int-id :foo) (u/int-id :foo)))
Expand Down Expand Up @@ -55,3 +57,8 @@
c (System/currentTimeMillis)]
(is (< 300 (- b a)))
(is (> 100 (- c b)))))

(deftest closest-android-ancestor
(let [ctx (Activity.)]
(is (= (u/closest-android-ancestor (class (proxy [LinearLayout] [ctx])))
android.widget.LinearLayout))))