Skip to content

Commit 1640119

Browse files
add unit test (#102)
Co-authored-by: GopherDID <74898029+vmidyllic@users.noreply.github.com>
1 parent 602d60b commit 1640119

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

merklize/merklize_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,20 @@ func TestHashValues_FromDocument(t *testing.T) {
14181418
value: "1997-04-16",
14191419
wantHash: "861148800000000000",
14201420
},
1421+
{
1422+
name: "xsd:dateTime YYYY-MM-DD go format (2006-01-02) < January 1st, 1970",
1423+
pathToField: "KYCEmployee.hireDate",
1424+
datatype: "http://www.w3.org/2001/XMLSchema#dateTime",
1425+
value: "1960-02-20",
1426+
wantHash: "21888242871839275222246405745257275088548364400416034343697892887375808495617",
1427+
},
1428+
{
1429+
name: "xsd:dateTime < January 1st, 1970 RFC3339Nano should be similar to YYYY-MM-DD format",
1430+
pathToField: "KYCEmployee.hireDate",
1431+
datatype: "http://www.w3.org/2001/XMLSchema#dateTime",
1432+
value: "1960-02-20T00:00:00Z",
1433+
wantHash: "21888242871839275222246405745257275088548364400416034343697892887375808495617",
1434+
},
14211435
{
14221436
name: "xsd:string",
14231437
pathToField: "KYCEmployee.position",

0 commit comments

Comments
 (0)