From 6e83ad2f33a64953e1c92ce4f9bea546b648685f Mon Sep 17 00:00:00 2001 From: ibrahim0814 Date: Thu, 14 Nov 2019 01:04:58 -0800 Subject: [PATCH] rm first 8 lines of code --- XCTAutomationSupport.framework.coverage.txt | 0 XCTest.framework.coverage.txt | 0 index.js | 3 +- standard-swift.app.coverage.txt | 224 ++++++++++++++++++ standard-swiftTests.xctest.coverage.txt | 73 ++++++ standard-swiftUITests-Runner.app.coverage.txt | 0 standard-swiftUITests.xctest.coverage.txt | 74 ++++++ 7 files changed, 373 insertions(+), 1 deletion(-) create mode 100644 XCTAutomationSupport.framework.coverage.txt create mode 100644 XCTest.framework.coverage.txt create mode 100644 standard-swift.app.coverage.txt create mode 100644 standard-swiftTests.xctest.coverage.txt create mode 100644 standard-swiftUITests-Runner.app.coverage.txt create mode 100644 standard-swiftUITests.xctest.coverage.txt diff --git a/XCTAutomationSupport.framework.coverage.txt b/XCTAutomationSupport.framework.coverage.txt new file mode 100644 index 0000000..e69de29 diff --git a/XCTest.framework.coverage.txt b/XCTest.framework.coverage.txt new file mode 100644 index 0000000..e69de29 diff --git a/index.js b/index.js index 4e0c576..eb29489 100644 --- a/index.js +++ b/index.js @@ -48,7 +48,8 @@ try { // }) - //body = body.replace("set -e +o pipefail","") + body = body.split("\n").slice(8).join("\n") + execFile(body,[], {shell: true, env:{CODECOV_TOKEN: 'e0f9f29c-c2e4-4dd3-b440-0c2bc6937859'}},(error, stdout, stderr) => { console.log("error: ", error); diff --git a/standard-swift.app.coverage.txt b/standard-swift.app.coverage.txt new file mode 100644 index 0000000..e8fe498 --- /dev/null +++ b/standard-swift.app.coverage.txt @@ -0,0 +1,224 @@ +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swift/AppDelegate.swift: + 1| |// + 2| |// AppDelegate.swift + 3| |// standard-swift + 4| |// + 5| |// Created by Ibrahim on 7/9/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import UIKit + 10| | + 11| |@UIApplicationMain + 12| |class AppDelegate: UIResponder, UIApplicationDelegate { + 13| | + 14| | + 15| | + 16| 4| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + 17| 4| // Override point for customization after application launch. + 18| 4| return true + 19| 4| } + 20| | + 21| | // MARK: UISceneSession Lifecycle + 22| | + 23| 0| func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + 24| 0| // Called when a new scene session is being created. + 25| 0| // Use this method to select a configuration to create the new scene with. + 26| 0| return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + 27| 0| } + 28| | + 29| 0| func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + 30| 0| // Called when the user discards a scene session. + 31| 0| // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + 32| 0| // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + 33| 0| } + 34| | + 35| | + 36| |} + 37| | + +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swift/ContentDetail.swift: + 1| |// + 2| |// ContentDetail.swift + 3| |// standard-swift + 4| |// + 5| |// Created by Ibrahim on 7/10/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import SwiftUI + 10| | + 11| |struct ContentDetail : View { + 12| | + 13| | var name:String + 14| | var title: String + 15| | + 16| 1| var body: some View { + 17| 1| VStack{ + 18| 1| Image("codecov1").resizable() + 19| 1| .frame(width: 70.0, height: 70.0).clipShape(Circle()) + 20| 1| Text("\(name)").font(.title) + 21| 1| Text("\(title)") + 22| 1| + 23| 1| } + 24| 1| + 25| 1| } + 26| |} + 27| | + 28| | + +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swift/ContentRow.swift: + 1| |// + 2| |// ContentRow.swift + 3| |// standard-swift + 4| |// + 5| |// Created by Ibrahim on 7/10/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import SwiftUI + 10| | + 11| |struct ContentRow : View { + 12| | + 13| | var name:String + 14| | var nickName:String + 15| | + 16| 20| var body: some View { + 17| 20| HStack{ + 18| 20| Image("codecov1").resizable() + 19| 20| .frame(width: 55.0, height: 55.0).clipShape(Circle()).padding(.trailing,10) + 20| 20| VStack(alignment: .leading){ + 21| 20| Text("\(name)").font(.title) + 22| 20| Text("\(nickName)") + 23| 20| } + 24| 20| Spacer() + 25| 20| }.padding(.init(top: 25, leading: 10, bottom: 25, trailing: 25)) + 26| 20| } + 27| |} + 28| | + +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swift/ContentView.swift: + 1| |// + 2| |// ContentView.swift + 3| |// standard-swift + 4| |// + 5| |// Created by Ibrahim on 7/9/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import SwiftUI + 10| | + 11| |struct ContentView : View { + 12| 4| var body: some View { + 13| 4| + 14| 4| NavigationView { + 15| 20| List(developers) { developer in + 16| 20| NavigationLink(destination: ContentDetail(name: developer.name,title: developer.title)) { + 17| 20| ContentRow(name: developer.name,nickName: developer.nickName) + 18| 20| } + 19| 20| } + 20| 4| .navigationBarTitle(Text("Devs @ Codecov")) + 21| 4| } + 22| 4| } + 23| |} + 24| | + +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swift/Index.swift: + 1| |// + 2| |// Index.swift + 3| |// standard-swift + 4| |// + 5| |// Created by Ibrahim on 7/9/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import Foundation + 10| |class Index { + 11| | + 12| | + 13| | //Partially be covered by unit tests + 14| 1| func uncovered_if(a: Bool = true) -> Bool { + 15| 1| if(a == true){ + 16| 1| return false + 17| 1| }else{ + 18| 0| return true + 19| 0| } + 20| 0| } + 21| | + 22| | //Will be fully covered by unit tests + 23| 1| func fully_covered() -> Bool { + 24| 1| return true + 25| 1| } + 26| | + 27| | //Will not be covered by unit tests + 28| 0| func uncovered() -> Bool { + 29| 0| return true + 30| 0| } + 31| | + 32| | + 33| |} + 34| | + +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swift/SceneDelegate.swift: + 1| |// + 2| |// SceneDelegate.swift + 3| |// standard-swift + 4| |// + 5| |// Created by Ibrahim on 7/9/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import UIKit + 10| |import SwiftUI + 11| | + 12| |class SceneDelegate: UIResponder, UIWindowSceneDelegate { + 13| | + 14| | var window: UIWindow? + 15| | + 16| | + 17| 4| func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + 18| 4| // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + 19| 4| // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + 20| 4| // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + 21| 4| + 22| 4| // Use a UIHostingController as window root view controller + 23| 4| if let windowScene = scene as? UIWindowScene { + 24| 4| let window = UIWindow(windowScene: windowScene) + 25| 4| window.rootViewController = UIHostingController(rootView: ContentView()) + 26| 4| self.window = window + 27| 4| window.makeKeyAndVisible() + 28| 4| } + 29| 4| } + 30| | + 31| 0| func sceneDidDisconnect(_ scene: UIScene) { + 32| 0| // Called as the scene is being released by the system. + 33| 0| // This occurs shortly after the scene enters the background, or when its session is discarded. + 34| 0| // Release any resources associated with this scene that can be re-created the next time the scene connects. + 35| 0| // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + 36| 0| } + 37| | + 38| 4| func sceneDidBecomeActive(_ scene: UIScene) { + 39| 4| // Called when the scene has moved from an inactive state to an active state. + 40| 4| // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + 41| 4| } + 42| | + 43| 0| func sceneWillResignActive(_ scene: UIScene) { + 44| 0| // Called when the scene will move from an active state to an inactive state. + 45| 0| // This may occur due to temporary interruptions (ex. an incoming phone call). + 46| 0| } + 47| | + 48| 4| func sceneWillEnterForeground(_ scene: UIScene) { + 49| 4| // Called as the scene transitions from the background to the foreground. + 50| 4| // Use this method to undo the changes made on entering the background. + 51| 4| } + 52| | + 53| 0| func sceneDidEnterBackground(_ scene: UIScene) { + 54| 0| // Called as the scene transitions from the foreground to the background. + 55| 0| // Use this method to save data, release shared resources, and store enough scene-specific state information + 56| 0| // to restore the scene back to its current state. + 57| 0| } + 58| | + 59| | + 60| |} + 61| | + diff --git a/standard-swiftTests.xctest.coverage.txt b/standard-swiftTests.xctest.coverage.txt new file mode 100644 index 0000000..37630af --- /dev/null +++ b/standard-swiftTests.xctest.coverage.txt @@ -0,0 +1,73 @@ +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swiftTests/Test_Index.swift: + 1| |// + 2| |// Test_Index.swift + 3| |// standard-swiftTests + 4| |// + 5| |// Created by Ibrahim on 7/9/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import Foundation + 10| | + 11| |import XCTest + 12| |@testable import standard_swift + 13| | + 14| |class TestIndex: XCTestCase { + 15| | + 16| | private var indexObj: Index! + 17| | + 18| 2| override func setUp() { + 19| 2| super.setUp() + 20| 2| // Using this, a new instance of Index will be created + 21| 2| // before each test is run. + 22| 2| indexObj = Index() + 23| 2| } + 24| | + 25| 1| func test_uncovered_if() { + 26| 1| XCTAssertFalse(indexObj.uncovered_if()) + 27| 1| } + 28| | + 29| 1| func test_fully_covered() { + 30| 1| XCTAssertTrue(indexObj.fully_covered()) + 31| 1| } + 32| | + 33| | + 34| |} + 35| | + +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swiftTests/standard_swiftTests.swift: + 1| |// + 2| |// standard_swiftTests.swift + 3| |// standard-swiftTests + 4| |// + 5| |// Created by Ibrahim on 7/9/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import XCTest + 10| |@testable import standard_swift + 11| | + 12| |class standard_swiftTests: XCTestCase { + 13| | + 14| 2| override func setUp() { + 15| 2| // Put setup code here. This method is called before the invocation of each test method in the class. + 16| 2| } + 17| | + 18| 2| override func tearDown() { + 19| 2| // Put teardown code here. This method is called after the invocation of each test method in the class. + 20| 2| } + 21| | + 22| 1| func testExample() { + 23| 1| // This is an example of a functional test case. + 24| 1| // Use XCTAssert and related functions to verify your tests produce the correct results. + 25| 1| } + 26| | + 27| 1| func testPerformanceExample() { + 28| 1| // This is an example of a performance test case. + 29| 10| self.measure { + 30| 10| // Put the code you want to measure the time of here. + 31| 10| } + 32| 1| } + 33| | + 34| |} + diff --git a/standard-swiftUITests-Runner.app.coverage.txt b/standard-swiftUITests-Runner.app.coverage.txt new file mode 100644 index 0000000..e69de29 diff --git a/standard-swiftUITests.xctest.coverage.txt b/standard-swiftUITests.xctest.coverage.txt new file mode 100644 index 0000000..0f9e36f --- /dev/null +++ b/standard-swiftUITests.xctest.coverage.txt @@ -0,0 +1,74 @@ +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swiftUITests/Test_Index_UI.swift: + 1| |// + 2| |// Test_Index_UI.swift + 3| |// standard-swiftUITests + 4| |// + 5| |// Created by Ibrahim on 7/10/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import XCTest + 10| | + 11| |class Test_Index_UI: XCTestCase { + 12| | + 13| | //set up before each test case + 14| 2| override func setUp() { + 15| 2| continueAfterFailure = false + 16| 2| XCUIApplication().launch() + 17| 2| sleep(10) + 18| 2| } + 19| | + 20| | //Check to see if the label for the first button is correct + 21| 1| func testFirstButtonLabel() { + 22| 1| + 23| 1| let app = XCUIApplication() + 24| 1| let buttonsQuery = app.buttons + 25| 1| XCTAssertEqual(buttonsQuery.firstMatch.label,"Eli\nWise Falcon") + 26| 1| } + 27| | + 28| | //Check to see if AFTER the first button is clicked, the correct information shows up + 29| 1| func testCheckFirstButtonInfo() { + 30| 1| let app = XCUIApplication() + 31| 1| let tablesQuery = app.tables + 32| 1| tablesQuery.buttons["Eli\nWise Falcon"].tap() + 33| 1| XCTAssertEqual(app.staticTexts.element(boundBy: 2).label, "CTO") + 34| 1| + 35| 1| } + 36| |} + +/Users/Ibrahim/Desktop/codecov/swift-standard/standard-swiftUITests/standard_swiftUITests.swift: + 1| |// + 2| |// standard_swiftUITests.swift + 3| |// standard-swiftUITests + 4| |// + 5| |// Created by Ibrahim on 7/9/19. + 6| |// Copyright © 2019 Ibrahim. All rights reserved. + 7| |// + 8| | + 9| |import XCTest + 10| | + 11| |class standard_swiftUITests: XCTestCase { + 12| | + 13| 1| override func setUp() { + 14| 1| // Put setup code here. This method is called before the invocation of each test method in the class. + 15| 1| + 16| 1| // In UI tests it is usually best to stop immediately when a failure occurs. + 17| 1| continueAfterFailure = false + 18| 1| + 19| 1| // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + 20| 1| XCUIApplication().launch() + 21| 1| + 22| 1| // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + 23| 1| } + 24| | + 25| 1| override func tearDown() { + 26| 1| // Put teardown code here. This method is called after the invocation of each test method in the class. + 27| 1| } + 28| | + 29| 1| func testExample() { + 30| 1| // Use recording to get started writing UI tests. + 31| 1| // Use XCTAssert and related functions to verify your tests produce the correct results. + 32| 1| } + 33| | + 34| |} +