File tree Expand file tree Collapse file tree 4 files changed +45
-3
lines changed
ValveKeyValue/Serialization/KeyValues3 Expand file tree Collapse file tree 4 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 1+ <!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
2+ {
3+ arrayValue = [
4+ "a",
5+ "b",
6+ ]
7+ arrayOnSingleLine = [
8+ 16.7551,
9+ 20.3763,
10+ 19.6448,
11+ ]
12+ arrayNoSpace = [
13+ 1.3763,
14+ 19.6448,
15+ ]
16+ arrayMixedTypes = [
17+ "a",
18+ 1,
19+ true,
20+ false,
21+ null,
22+ {
23+ foo = "bar"
24+ },
25+ [
26+ 1,
27+ 3,
28+ 3,
29+ 7,
30+ ],
31+ #[
32+ 11 FF
33+ ],
34+ resource:"hello.world",
35+ """
36+ multiline
37+ string
38+ """,
39+ -69.42,
40+ ]
41+ test = "success"
42+ }
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ public void SerializesArraysToObjects()
5252 text = reader . ReadToEnd ( ) ;
5353 }
5454
55- System . Console . WriteLine ( text ) ;
56-
5755 Assert . That ( text , Is . EqualTo ( expected ) ) ;
5856 }
5957 }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public void CreatesTextDocument()
3333 public void SerializesArray ( )
3434 {
3535 using var stream = TestDataHelper . OpenResource ( "TextKV3.array.kv3" ) ;
36- var expected = TestDataHelper . ReadTextResource ( "TextKV3.array .kv3" ) ;
36+ var expected = TestDataHelper . ReadTextResource ( "TextKV3.array_serialized .kv3" ) ;
3737
3838 var kv = KVSerializer . Create ( KVSerializationFormat . KeyValues3Text ) ;
3939 var data = kv . Deserialize ( stream ) ;
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ public void OnArrayEnd()
6464 indentation -- ;
6565 WriteIndentation ( ) ;
6666 writer . Write ( ']' ) ;
67+ // TODO: Write comma if we're in an array
6768 writer . WriteLine ( ) ;
6869 }
6970
@@ -94,6 +95,7 @@ void WriteEndObject()
9495 indentation -- ;
9596 WriteIndentation ( ) ;
9697 writer . Write ( '}' ) ;
98+ // TODO: Write comma if we're in an array
9799 writer . WriteLine ( ) ;
98100 }
99101
You can’t perform that action at this time.
0 commit comments