This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With my case how I mock the static variable and I hope this can help you, here is my workaround: | |
For example, I have a static `count` value in production code: | |
``` | |
@implementation MyClass | |
static int _count = 0; | |
- (int)viewDidAppearCount { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ColdStartEventManagerTest.m | |
// InteractorTest | |
// | |
// Created by BBM on 28/3/18. | |
// | |
#import "ColdStartEventManager.h" | |
#import "AhoyReporterProtocol.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def supported_staticlib_pods | |
return ['YouTubeVideoPlayer'] | |
end | |
# Improve Pre-main Time | |
# Using `staticlib` | |
# Removing the `staticlib` from `[CP] Embed Pods Frameworks` | |
def improve_pre_main_time_loading(installer, project_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RESET=`tput sgr0` | |
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
if [ "$1" ]; then | |
if ! [ -e "$1" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if ! gem spec slather > /dev/null 2>&1; then | |
echo "Installing slather..." | |
sudo gem install slather | |
fi | |
if [ -e ~/.bashrc ] | |
then | |
string=$(<~/.bashrc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def supported_staticlib_pods | |
return ['YouTubeVideoPlayer'] | |
end | |
# After we improve Pre-main time app in [improve-pre-main-time-loading.rb](https://gist.github.com/levantAJ/b8eef8121573085d130fde46442e9658) | |
# Xcode can't generate test coverage with static libs http://www.openradar.me/41024315 | |
# We have to convert back to dylib when running test coverage | |
# You need to run this before runing unit-test for checking test coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// XCTestCase+Extension.swift | |
// UITests | |
// | |
// Created by levantAJ on 3/16/19. | |
// Copyright © 2019 levantAJ. All rights reserved. | |
// | |
import XCTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ $(command -v brew) == "" ]]; then | |
echo "Installing Hombrew..." | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
if [[ $(command -v magick) == "" ]]; then | |
echo "Installing magick..." | |
brew install ImageMagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PhotoPreviewViewController.swift | |
// ShopBack | |
// | |
// Created by Tai Le on 8/31/19. | |
// Copyright © 2019 levantAJ. All rights reserved. | |
// | |
import UIKit | |
import SDWebImage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file to facilitate getting test coverage percentage | |
# | |
# How to use: | |
# 1. For all test cases: | |
# bash test-coverage.sh | |
# | |
# 2. For test cases belong to a feature: | |
# bash test-coverage.sh {Feature_Folder_Name} | |
# Feature_Folder_Name: The name of the folder under YourProject. |