發表文章

目前顯示的是 7月, 2013的文章

UT on Mac

筆記:在Mac Console上直接執行xcode UT xcode 的UT 基本上是去執行"otest"這個執行檔(otest 在 /Developer/Tools/下),要執行需要兩個參數 1. -SenTest <para>      <para>: Self, All, <testClassName/testModuleName>      Self 跟 All 不太清楚有什麼差異,在我的case兩個都是全跑      <testClassName/testModuleName> 也可以只給 testClassName 2. <path of your UT bundle>     簡單來說,就是你的UT build出來的那個.octest 檔案的路徑 在順帶一提,如果想在xcode上 step by step debug你的UT 1. Add a "Custom Executable" on your project 2. Set "Executable Path" to "Developer/Tools/otest" 3. Finish 4. 對你剛產生出來的Executable按右鍵,選" Get Info ",修改下列資訊     on the [General] tab         a. Set the working dir to: Product directory     on the [Arguments] tab , add the followings in Argument field          a. -SenTest Self         b.  $(BUILT_PRODUCTS_DIR)/xxx.octest     add the following in the Environment Variable filed         a. OBJC_DISABLE_GC  to <YES>          -->   disable GC,