]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/pkt_test.go
Raise copyright years
[nncp.git] / src / cypherpunks.ru / nncp / pkt_test.go
index 15bff169132f01aa11eeb572f7aaa21c23ae7908..3e3523c447deabb1ad3584d50b4f6c13a325e82e 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2017 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ func TestPktEncWrite(t *testing.T) {
                if len(path) > int(pathSize) {
                        path = path[:int(pathSize)]
                }
-               pkt, err := NewPkt(PktTypeFile, path)
+               pkt, err := NewPkt(PktTypeFile, 123, []byte(path))
                if err != nil {
                        panic(err)
                }
@@ -81,13 +81,18 @@ func TestPktEncRead(t *testing.T) {
        if err != nil {
                panic(err)
        }
-       f := func(path string, pathSize uint8, data [1 << 16]byte, size, padSize uint16, junk []byte) bool {
+       f := func(
+               path string,
+               pathSize uint8,
+               data [1 << 16]byte,
+               size, padSize uint16,
+               junk []byte) bool {
                dataR := bytes.NewReader(data[:])
                var ct bytes.Buffer
                if len(path) > int(pathSize) {
                        path = path[:int(pathSize)]
                }
-               pkt, err := NewPkt(PktTypeFile, path)
+               pkt, err := NewPkt(PktTypeFile, 123, []byte(path))
                if err != nil {
                        panic(err)
                }