Skip to content

Instantly share code, notes, and snippets.

View lzwjava's full-sized avatar

Zhiwei Li lzwjava

View GitHub Profile
#define assertTrue(expr) XCTAssertTrue((expr), @"")
#define assertFalse(expr) XCTAssertFalse((expr), @"")
#define assertNil(a1) XCTAssertNil((a1), @"")
#define assertNotNil(a1) XCTAssertNotNil((a1), @"")
#define assertEqual(a1, a2) XCTAssertEqual((a1), (a2), @"")
#define assertEqualObjects(a1, a2) XCTAssertEqualObjects((a1), (a2), @"")
#define assertNotEqual(a1, a2) XCTAssertNotEqual((a1), (a2), @"")
#define assertNotEqualObjects(a1, a2) XCTAssertNotEqualObjects((a1), (a2), @"")
#define assertAccuracy(a1, a2, acc) XCTAssertEqualWithAccuracy((a1),(a2),(acc))
@lzwjava
lzwjava / customsshd
Created November 17, 2015 02:07 — forked from xfreebird/customsshd
A script which can be used to start a second SSHD daemon on OS X. This is an workaround for running tests using xcodebuild through ssh with Jenkins .
#!/bin/bash
INSTALL_PATH="$HOME/scripts"
SCRIPT_PATH="$INSTALL_PATH/customsshd"
LAUNCHCTL_PATH="$HOME/Library/LaunchAgents/com.my.customsshd.plist"
SSH_KEYS_INSTALL_PATH=$HOME/customkeys
SSH_HOST_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_key
SSH_HOST_RSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_rsa_key
SSH_HOST_DSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_dsa_key
SSHD_PORT=50111
#pragma mark - Match tool
- (BOOL)miniDictionary:(NSDictionary *)input matchTo:(NSDictionary *)dict {
if (input.count == 0 || dict.count == 0) {
return YES;
@lzwjava
lzwjava / gist:3d8fe8e500bcd580cb4e
Last active August 29, 2015 14:17
MCTestViewController.m
//
// MCTestViewController.m
// ClassNet
//
// Created by lzw on 15/3/26.
// Copyright (c) 2015年 lzw. All rights reserved.
//
#import "MCTestViewController.h"