Skip to content

Commit

Permalink
Inform the .xcodeproj of new files and fix two tests in UTF16 mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adora Lynch committed Oct 9, 2024
1 parent aa983d8 commit cd4bc61
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/Yams/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public final class Parser {
}()

/// The equivalent `Swift.Encoding` value for `self`.
internal var swiftStringEncoding: String.Encoding {
public var swiftStringEncoding: String.Encoding {
switch self {
case .utf8:
return .utf8
Expand Down
2 changes: 1 addition & 1 deletion Tests/YamsTests/AnchorCodingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AnchorCodingTests: XCTestCase {
stringValue: it's a value
intValue: 52
""".data(using: .utf8)!
""".data(using: decoder.encoding.swiftStringEncoding)!

let decodedStruct = try decoder.decode(SimpleWithStringTypeAnchorName.self, from: data)

Expand Down
2 changes: 1 addition & 1 deletion Tests/YamsTests/TagCodingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class TagCodingTests: XCTestCase {
stringValue: it's a value
intValue: 52
""".data(using: .utf8)!
""".data(using: decoder.encoding.swiftStringEncoding)!

let decodedStruct = try decoder.decode(SimpleWithStringTypeTagName.self, from: data)

Expand Down
44 changes: 42 additions & 2 deletions Yams.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
6CF0253A1E9D12680061FB47 /* MarkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF025391E9D12680061FB47 /* MarkTests.swift */; };
6CF6CE091E0E3B1000CB87D4 /* PerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF6CE081E0E3B1000CB87D4 /* PerformanceTests.swift */; };
8FA807DC24B250EF0082215D /* TopLevelDecoderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FA807DB24B250EF0082215D /* TopLevelDecoderTests.swift */; };
8FBD7F7F2CB70C8900271BB9 /* Node.Alias.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F7B2CB70C8900271BB9 /* Node.Alias.swift */; };
8FBD7F802CB70C8900271BB9 /* YamlAnchorProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F7D2CB70C8900271BB9 /* YamlAnchorProviding.swift */; };
8FBD7F812CB70C8900271BB9 /* YamlTagProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F7E2CB70C8900271BB9 /* YamlTagProviding.swift */; };
8FBD7F822CB70C8900271BB9 /* RedundancyAliasingStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F7C2CB70C8900271BB9 /* RedundancyAliasingStrategy.swift */; };
8FBD7F832CB70C8900271BB9 /* Anchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F7A2CB70C8900271BB9 /* Anchor.swift */; };
8FBD7F892CB70CFB00271BB9 /* NodeDecoderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F862CB70CFB00271BB9 /* NodeDecoderTests.swift */; };
8FBD7F8A2CB70CFB00271BB9 /* AnchorCodingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F842CB70CFB00271BB9 /* AnchorCodingTests.swift */; };
8FBD7F8B2CB70CFB00271BB9 /* AnchorTolerancesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F852CB70CFB00271BB9 /* AnchorTolerancesTests.swift */; };
8FBD7F8C2CB70CFB00271BB9 /* TagTolerancesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F882CB70CFB00271BB9 /* TagTolerancesTests.swift */; };
8FBD7F8D2CB70CFB00271BB9 /* TagCodingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FBD7F872CB70CFB00271BB9 /* TagCodingTests.swift */; };
E8EDB8851DE2181B0062268D /* api.c in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* api.c */; };
E8EDB8871DE2181B0062268D /* emitter.c in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* emitter.c */; };
E8EDB8891DE2181B0062268D /* parser.c in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* parser.c */; };
Expand Down Expand Up @@ -87,6 +97,16 @@
6CF6CE071E0E3A5900CB87D4 /* Fixtures */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Fixtures; sourceTree = "<group>"; };
6CF6CE081E0E3B1000CB87D4 /* PerformanceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PerformanceTests.swift; sourceTree = "<group>"; };
8FA807DB24B250EF0082215D /* TopLevelDecoderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopLevelDecoderTests.swift; sourceTree = "<group>"; };
8FBD7F7A2CB70C8900271BB9 /* Anchor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Anchor.swift; sourceTree = "<group>"; };
8FBD7F7B2CB70C8900271BB9 /* Node.Alias.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Node.Alias.swift; sourceTree = "<group>"; };
8FBD7F7C2CB70C8900271BB9 /* RedundancyAliasingStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedundancyAliasingStrategy.swift; sourceTree = "<group>"; };
8FBD7F7D2CB70C8900271BB9 /* YamlAnchorProviding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YamlAnchorProviding.swift; sourceTree = "<group>"; };
8FBD7F7E2CB70C8900271BB9 /* YamlTagProviding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YamlTagProviding.swift; sourceTree = "<group>"; };
8FBD7F842CB70CFB00271BB9 /* AnchorCodingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnchorCodingTests.swift; sourceTree = "<group>"; };
8FBD7F852CB70CFB00271BB9 /* AnchorTolerancesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnchorTolerancesTests.swift; sourceTree = "<group>"; };
8FBD7F862CB70CFB00271BB9 /* NodeDecoderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NodeDecoderTests.swift; sourceTree = "<group>"; };
8FBD7F872CB70CFB00271BB9 /* TagCodingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagCodingTests.swift; sourceTree = "<group>"; };
8FBD7F882CB70CFB00271BB9 /* TagTolerancesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagTolerancesTests.swift; sourceTree = "<group>"; };
OBJ_10 /* api.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = api.c; sourceTree = "<group>"; };
OBJ_12 /* emitter.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = emitter.c; sourceTree = "<group>"; };
OBJ_14 /* parser.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = parser.c; sourceTree = "<group>"; };
Expand Down Expand Up @@ -131,21 +151,26 @@
OBJ_21 /* Yams */ = {
isa = PBXGroup;
children = (
8FBD7F7A2CB70C8900271BB9 /* Anchor.swift */,
6C0D2A351E0A934B00C45545 /* Constructor.swift */,
6C4AF31E1EBE14A1008775BC /* Decoder.swift */,
6CE603971E13502E00A13D8D /* Emitter.swift */,
6C788A021EB876C4005386F0 /* Encoder.swift */,
6CF025371E9CF4380061FB47 /* Mark.swift */,
6C6834C71E0281880047B4D1 /* Node.swift */,
6C0409AB1E607E9900C95D83 /* Node.Scalar.swift */,
8FBD7F7B2CB70C8900271BB9 /* Node.Alias.swift */,
6C0409A71E602E9A00C95D83 /* Node.Mapping.swift */,
6C0409AB1E607E9900C95D83 /* Node.Scalar.swift */,
6C0409A91E6033DF00C95D83 /* Node.Sequence.swift */,
6C6834CB1E0283980047B4D1 /* Parser.swift */,
8FBD7F7C2CB70C8900271BB9 /* RedundancyAliasingStrategy.swift */,
6CC2E33E1E22347B00F62269 /* Representer.swift */,
6C6834D21E02B9760047B4D1 /* Resolver.swift */,
6C4A22061DF8553C002A0206 /* String+Yams.swift */,
6C6834C91E0281D90047B4D1 /* Tag.swift */,
8FBD7F7D2CB70C8900271BB9 /* YamlAnchorProviding.swift */,
OBJ_22 /* YamlError.swift */,
8FBD7F7E2CB70C8900271BB9 /* YamlTagProviding.swift */,
6CBAEE191E3839500021BF87 /* Yams.h */,
);
name = Yams;
Expand All @@ -164,17 +189,22 @@
OBJ_24 /* YamsTests */ = {
isa = PBXGroup;
children = (
6CF6CE071E0E3A5900CB87D4 /* Fixtures */,
8FBD7F842CB70CFB00271BB9 /* AnchorCodingTests.swift */,
8FBD7F852CB70CFB00271BB9 /* AnchorTolerancesTests.swift */,
6C0488ED1E0CBD56006F9F80 /* ConstructorTests.swift */,
6C0A00D41E152D6200222704 /* EmitterTests.swift */,
6C788A001EB87232005386F0 /* EncoderTests.swift */,
6CF6CE071E0E3A5900CB87D4 /* Fixtures */,
6CF025391E9D12680061FB47 /* MarkTests.swift */,
8FBD7F862CB70CFB00271BB9 /* NodeDecoderTests.swift */,
6C3C90B81E0FFB6B009DEFE8 /* NodeTests.swift */,
6CF6CE081E0E3B1000CB87D4 /* PerformanceTests.swift */,
6C78C5631E29B1CE0096215F /* RepresenterTests.swift */,
6C6834D41E02BC1F0047B4D1 /* ResolverTests.swift */,
6C6834D01E0297390047B4D1 /* SpecTests.swift */,
6C4A22081DF855BB002A0206 /* StringTests.swift */,
8FBD7F872CB70CFB00271BB9 /* TagCodingTests.swift */,
8FBD7F882CB70CFB00271BB9 /* TagTolerancesTests.swift */,
6C0488EB1E0BE113006F9F80 /* TestHelper.swift */,
8FA807DB24B250EF0082215D /* TopLevelDecoderTests.swift */,
OBJ_25 /* YamlErrorTests.swift */,
Expand Down Expand Up @@ -359,6 +389,11 @@
6C4AF3201EBE1705008775BC /* Decoder.swift in Sources */,
6C0409AC1E607E9900C95D83 /* Node.Scalar.swift in Sources */,
6C4A22071DF8553C002A0206 /* String+Yams.swift in Sources */,
8FBD7F7F2CB70C8900271BB9 /* Node.Alias.swift in Sources */,
8FBD7F802CB70C8900271BB9 /* YamlAnchorProviding.swift in Sources */,
8FBD7F812CB70C8900271BB9 /* YamlTagProviding.swift in Sources */,
8FBD7F822CB70C8900271BB9 /* RedundancyAliasingStrategy.swift in Sources */,
8FBD7F832CB70C8900271BB9 /* Anchor.swift in Sources */,
E8EDB8891DE2181B0062268D /* parser.c in Sources */,
6CF025381E9CF4380061FB47 /* Mark.swift in Sources */,
OBJ_50 /* YamlError.swift in Sources */,
Expand All @@ -376,6 +411,11 @@
6CF6CE091E0E3B1000CB87D4 /* PerformanceTests.swift in Sources */,
6C4A22091DF855BB002A0206 /* StringTests.swift in Sources */,
6C0488EC1E0BE113006F9F80 /* TestHelper.swift in Sources */,
8FBD7F892CB70CFB00271BB9 /* NodeDecoderTests.swift in Sources */,
8FBD7F8A2CB70CFB00271BB9 /* AnchorCodingTests.swift in Sources */,
8FBD7F8B2CB70CFB00271BB9 /* AnchorTolerancesTests.swift in Sources */,
8FBD7F8C2CB70CFB00271BB9 /* TagTolerancesTests.swift in Sources */,
8FBD7F8D2CB70CFB00271BB9 /* TagCodingTests.swift in Sources */,
6C78C5651E29B27D0096215F /* RepresenterTests.swift in Sources */,
6C3C90B91E0FFB6B009DEFE8 /* NodeTests.swift in Sources */,
6C0A00D51E152D6200222704 /* EmitterTests.swift in Sources */,
Expand Down

0 comments on commit cd4bc61

Please sign in to comment.