Skip to content

Commit

Permalink
clean inject test
Browse files Browse the repository at this point in the history
  • Loading branch information
ming1016 committed Mar 7, 2024
1 parent d633e0d commit 8eef856
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 194 deletions.
18 changes: 0 additions & 18 deletions InstrProfiling.h

This file was deleted.

25 changes: 2 additions & 23 deletions SwiftPamphletApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@
086A5F642754C14F00FECE02 /* PlayTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086A5F632754C14F00FECE02 /* PlayTextView.swift */; };
086A5F672754C27900FECE02 /* DBHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086A5F662754C27900FECE02 /* DBHandler.swift */; };
086A5F6A2755F3BE00FECE02 /* repos.json in Resources */ = {isa = PBXBuildFile; fileRef = 086A5F692755F3BE00FECE02 /* repos.json */; };
0886702E27F804010001EA81 /* module.modulemap in Sources */ = {isa = PBXBuildFile; fileRef = 0886702D27F804010001EA81 /* module.modulemap */; };
0886703227FD77F90001EA81 /* Inject in Frameworks */ = {isa = PBXBuildFile; productRef = 0886703127FD77F90001EA81 /* Inject */; };
088EE8F527BD24E000764525 /* PlayLinkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 088EE8F427BD24E000764525 /* PlayLinkView.swift */; };
0896FB9027BA39B100676B7F /* PlayButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0896FB8F27BA39B100676B7F /* PlayButtonView.swift */; };
0896FB9227BA486900676B7F /* 145.md in Resources */ = {isa = PBXBuildFile; fileRef = 0896FB9127BA486900676B7F /* 145.md */; };
Expand Down Expand Up @@ -442,9 +440,7 @@
086A5F632754C14F00FECE02 /* PlayTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayTextView.swift; sourceTree = "<group>"; };
086A5F662754C27900FECE02 /* DBHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DBHandler.swift; sourceTree = "<group>"; };
086A5F692755F3BE00FECE02 /* repos.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = repos.json; path = SwiftPamphletApp/Resource/News/repos.json; sourceTree = SOURCE_ROOT; };
0886702A27F803E20001EA81 /* InstrProfiling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstrProfiling.h; sourceTree = "<group>"; };
0886702B27F804010001EA81 /* SwiftPamphletApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwiftPamphletApp-Bridging-Header.h"; sourceTree = "<group>"; };
0886702D27F804010001EA81 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
088EE8F427BD24E000764525 /* PlayLinkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayLinkView.swift; sourceTree = "<group>"; };
0896FB8F27BA39B100676B7F /* PlayButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayButtonView.swift; sourceTree = "<group>"; };
0896FB9127BA486900676B7F /* 145.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = 145.md; sourceTree = "<group>"; };
Expand Down Expand Up @@ -532,7 +528,6 @@
08448F092796A83D00B61353 /* SwiftDate in Frameworks */,
08BF26D02768A59A0064DDAC /* SQLite in Frameworks */,
08448F4E279E8CA400B61353 /* Ink in Frameworks */,
0886703227FD77F90001EA81 /* Inject in Frameworks */,
08BE634027BF953A002BC6A8 /* CodeEditorView in Frameworks */,
08BF26D32768A5B40064DDAC /* MarkdownUI in Frameworks */,
08D107BD278826BB007B7009 /* HTMLEntities in Frameworks */,
Expand Down Expand Up @@ -1043,8 +1038,6 @@
086A5EFA2744E88E00FECE02 = {
isa = PBXGroup;
children = (
0886702A27F803E20001EA81 /* InstrProfiling.h */,
0886702D27F804010001EA81 /* module.modulemap */,
086A5F052744E88E00FECE02 /* SwiftPamphletApp */,
086A5F042744E88E00FECE02 /* Products */,
0886702B27F804010001EA81 /* SwiftPamphletApp-Bridging-Header.h */,
Expand Down Expand Up @@ -1370,7 +1363,6 @@
08448F082796A83D00B61353 /* SwiftDate */,
08448F4D279E8CA400B61353 /* Ink */,
08BE633F27BF953A002BC6A8 /* CodeEditorView */,
0886703127FD77F90001EA81 /* Inject */,
);
productName = SwiftPamphletApp;
productReference = 086A5F032744E88E00FECE02 /* 戴铭的开发小册子.app */;
Expand Down Expand Up @@ -1408,7 +1400,6 @@
08448F072796A83D00B61353 /* XCRemoteSwiftPackageReference "SwiftDate" */,
08448F4C279E8CA400B61353 /* XCRemoteSwiftPackageReference "ink" */,
08BE633E27BF953A002BC6A8 /* XCRemoteSwiftPackageReference "CodeEditorView" */,
0886703027FD77F90001EA81 /* XCRemoteSwiftPackageReference "Inject" */,
);
productRefGroup = 086A5F042744E88E00FECE02 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1610,7 +1601,6 @@
08BE634827C4B6A2002BC6A8 /* PlayStackView.swift in Sources */,
08BE636227C878EC002BC6A8 /* PlayLazyVStackAndLazyHStackView.swift in Sources */,
08BE634627C48C5B002BC6A8 /* PlayToggleView.swift in Sources */,
0886702E27F804010001EA81 /* module.modulemap in Sources */,
08448F41279AC1A900B61353 /* PlayMacOS.swift in Sources */,
08AEAEF7277F389300B969E2 /* RSSItemContentView.swift in Sources */,
0896FB9027BA39B100676B7F /* PlayButtonView.swift in Sources */,
Expand Down Expand Up @@ -1817,6 +1807,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = SwiftPamphletApp/SwiftPamphletAppDebug.entitlements;
CODE_SIGN_IDENTITY = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
Expand Down Expand Up @@ -1857,6 +1848,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = SwiftPamphletApp/SwiftPamphletApp.entitlements;
CODE_SIGN_IDENTITY = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
Expand Down Expand Up @@ -1921,14 +1913,6 @@
minimumVersion = 0.5.1;
};
};
0886703027FD77F90001EA81 /* XCRemoteSwiftPackageReference "Inject" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/krzysztofzablocki/Inject.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.0.0;
};
};
08BE633E27BF953A002BC6A8 /* XCRemoteSwiftPackageReference "CodeEditorView" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mchakravarty/CodeEditorView.git";
Expand Down Expand Up @@ -1974,11 +1958,6 @@
package = 08448F4C279E8CA400B61353 /* XCRemoteSwiftPackageReference "ink" */;
productName = Ink;
};
0886703127FD77F90001EA81 /* Inject */ = {
isa = XCSwiftPackageProductDependency;
package = 0886703027FD77F90001EA81 /* XCRemoteSwiftPackageReference "Inject" */;
productName = Inject;
};
08BE633F27BF953A002BC6A8 /* CodeEditorView */ = {
isa = XCSwiftPackageProductDependency;
package = 08BE633E27BF953A002BC6A8 /* XCRemoteSwiftPackageReference "CodeEditorView" */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,115 +1,105 @@
{
"object": {
"pins": [
{
"package": "AttributedText",
"repositoryURL": "https://github.com/gonzalezreal/AttributedText",
"state": {
"branch": null,
"revision": "2dc2d7864e0fee4b524a5850d7d7cf9a7eeda0fc",
"version": "1.0.0"
}
},
{
"package": "CodeEditorView",
"repositoryURL": "https://github.com/mchakravarty/CodeEditorView.git",
"state": {
"branch": "main",
"revision": "373f3ecfaabdd06918e655cf4516b046aa7e290c",
"version": null
}
},
{
"package": "combine-schedulers",
"repositoryURL": "https://github.com/pointfreeco/combine-schedulers",
"state": {
"branch": null,
"revision": "4cf088c29a20f52be0f2ca54992b492c54e0076b",
"version": "0.5.3"
}
},
{
"package": "Inject",
"repositoryURL": "https://github.com/krzysztofzablocki/Inject.git",
"state": {
"branch": null,
"revision": "84ebbde86df4ec7532e8bfc6ad1fe4ed2ca1114f",
"version": "1.0.3"
}
},
{
"package": "Ink",
"repositoryURL": "https://github.com/johnsundell/ink.git",
"state": {
"branch": null,
"revision": "77c3d8953374a9cf5418ef0bd7108524999de85a",
"version": "0.5.1"
}
},
{
"package": "MarkdownUI",
"repositoryURL": "https://github.com/gonzalezreal/MarkdownUI",
"state": {
"branch": null,
"revision": "94e07c111f1ef0a9c997d2fadac984e8bb7d7405",
"version": "1.0.0"
}
},
{
"package": "NetworkImage",
"repositoryURL": "https://github.com/gonzalezreal/NetworkImage",
"state": {
"branch": null,
"revision": "f8b8ed0be39d2f4aa00a6e8d3b18a62a94eff8d8",
"version": "4.0.0"
}
},
{
"package": "SQLite.swift",
"repositoryURL": "https://github.com/stephencelis/SQLite.swift.git",
"state": {
"branch": null,
"revision": "60a65015f6402b7c34b9a924f755ca0a73afeeaa",
"version": "0.13.1"
}
},
{
"package": "HTMLEntities",
"repositoryURL": "https://github.com/Kitura/swift-html-entities.git",
"state": {
"branch": null,
"revision": "3686a2b931be24dd2531307f89e2f1d648c0200e",
"version": "4.0.0"
}
},
{
"package": "SwiftCommonMark",
"repositoryURL": "https://github.com/gonzalezreal/SwiftCommonMark",
"state": {
"branch": null,
"revision": "ed252beaddecce28ea6363f800c773d6169011b8",
"version": "1.0.0"
}
},
{
"package": "SwiftDate",
"repositoryURL": "https://github.com/malcommac/SwiftDate",
"state": {
"branch": null,
"revision": "6190d0cefff3013e77ed567e6b074f324e5c5bf5",
"version": "6.3.1"
}
},
{
"package": "xctest-dynamic-overlay",
"repositoryURL": "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state": {
"branch": null,
"revision": "50a70a9d3583fe228ce672e8923010c8df2deddd",
"version": "0.2.1"
}
"originHash" : "444bf76c1a8e33e1b420e260bf0545c937e0cf4b69b77cc9417a74ab5f5a1b40",
"pins" : [
{
"identity" : "attributedtext",
"kind" : "remoteSourceControl",
"location" : "https://github.com/gonzalezreal/AttributedText",
"state" : {
"revision" : "2dc2d7864e0fee4b524a5850d7d7cf9a7eeda0fc",
"version" : "1.0.0"
}
]
},
"version": 1
},
{
"identity" : "codeeditorview",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mchakravarty/CodeEditorView.git",
"state" : {
"branch" : "main",
"revision" : "373f3ecfaabdd06918e655cf4516b046aa7e290c"
}
},
{
"identity" : "combine-schedulers",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "4cf088c29a20f52be0f2ca54992b492c54e0076b",
"version" : "0.5.3"
}
},
{
"identity" : "ink",
"kind" : "remoteSourceControl",
"location" : "https://github.com/johnsundell/ink.git",
"state" : {
"revision" : "77c3d8953374a9cf5418ef0bd7108524999de85a",
"version" : "0.5.1"
}
},
{
"identity" : "markdownui",
"kind" : "remoteSourceControl",
"location" : "https://github.com/gonzalezreal/MarkdownUI",
"state" : {
"revision" : "94e07c111f1ef0a9c997d2fadac984e8bb7d7405",
"version" : "1.0.0"
}
},
{
"identity" : "networkimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/gonzalezreal/NetworkImage",
"state" : {
"revision" : "f8b8ed0be39d2f4aa00a6e8d3b18a62a94eff8d8",
"version" : "4.0.0"
}
},
{
"identity" : "sqlite.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stephencelis/SQLite.swift.git",
"state" : {
"revision" : "60a65015f6402b7c34b9a924f755ca0a73afeeaa",
"version" : "0.13.1"
}
},
{
"identity" : "swift-html-entities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kitura/swift-html-entities.git",
"state" : {
"revision" : "3686a2b931be24dd2531307f89e2f1d648c0200e",
"version" : "4.0.0"
}
},
{
"identity" : "swiftcommonmark",
"kind" : "remoteSourceControl",
"location" : "https://github.com/gonzalezreal/SwiftCommonMark",
"state" : {
"revision" : "ed252beaddecce28ea6363f800c773d6169011b8",
"version" : "1.0.0"
}
},
{
"identity" : "swiftdate",
"kind" : "remoteSourceControl",
"location" : "https://github.com/malcommac/SwiftDate",
"state" : {
"revision" : "6190d0cefff3013e77ed567e6b074f324e5c5bf5",
"version" : "6.3.1"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "50a70a9d3583fe228ce672e8923010c8df2deddd",
"version" : "0.2.1"
}
}
],
"version" : 3
}
16 changes: 1 addition & 15 deletions SwiftPamphletApp/Core/FundationFunction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import SwiftUI
import Combine
import Network
import SwiftDate
import InstrProfiling

// MARK: - Web
func wrapperHtmlContent(content: String, codeStyle: String = "lioshi.min") -> String {
Expand Down Expand Up @@ -181,17 +180,4 @@ extension View {
}
}

// MARK: - 代码覆盖率
func codeCoverageProfrawDump(fileName: String = "cc") {
let name = "\(fileName).profraw"
let fileManager = FileManager.default
do {
let documentDirectory = try fileManager.url(for: .documentDirectory, in: .userDomainMask, appropriateFor:nil, create:false)
let filePath: NSString = documentDirectory.appendingPathComponent(name).path as NSString
__llvm_profile_set_filename(filePath.utf8String)
print("File at: \(String(cString: __llvm_profile_get_filename()))")
__llvm_profile_write_file()
} catch {
print(error)
}
}

14 changes: 0 additions & 14 deletions SwiftPamphletApp/Resource/News/rssfeed.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
"siteLink":"https://www.swift.org/",
"feedLink":"https://www.swift.org/atom.xml"
},
{
"title":"iOS摸鱼周报",
"id":2201071620,
"des":"iOS 摸鱼周报",
"siteLink":"https://zhangferry.com/",
"feedLink":"https://zhangferry.com/atom.xml"
},
{
"title":"Michael Tsai",
"id":2201111053,
Expand Down Expand Up @@ -62,13 +55,6 @@
"siteLink":"https://ming1016.github.io",
"feedLink":"https://ming1016.github.io/atom.xml"
},
{
"title":"Swift by Sundell",
"id":2112311444,
"des":"Weekly Swift articles, podcasts and tips by John Sundell",
"siteLink":"https://www.swiftbysundell.com",
"feedLink":"https://www.swiftbysundell.com/rss"
},
{
"title":"FIVE STARS",
"id":2201071601,
Expand Down
Loading

0 comments on commit 8eef856

Please sign in to comment.