]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/toss_test.go
Raise copyright years
[nncp.git] / src / toss_test.go
index 4ccf4ead4ca656ff8738b6773b5cf385b56339ae..b6df326256cf6c0eba277f9ff47b379463f85621 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2020 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
@@ -30,7 +30,7 @@ import (
        "testing"
        "testing/quick"
 
-       "github.com/davecgh/go-xdr/xdr2"
+       xdr "github.com/davecgh/go-xdr/xdr2"
        "golang.org/x/crypto/blake2b"
 )
 
@@ -199,7 +199,9 @@ func TestTossFile(t *testing.T) {
                                DefaultNiceFile,
                                src,
                                fileName,
+                               MaxFileSize,
                                1<<15,
+                               MaxFileSize,
                        ); err != nil {
                                t.Error(err)
                                return false
@@ -273,7 +275,9 @@ func TestTossFileSameName(t *testing.T) {
                                DefaultNiceFile,
                                srcPath,
                                "samefile",
+                               MaxFileSize,
                                1<<15,
+                               MaxFileSize,
                        ); err != nil {
                                t.Error(err)
                                return false
@@ -357,7 +361,7 @@ func TestTossFreq(t *testing.T) {
                if len(dirFiles(txPath)) != 0 || len(dirFiles(rxPath)) == 0 {
                        return false
                }
-               ctx.Neigh[*nodeOur.Id].Freq = &spool
+               ctx.Neigh[*nodeOur.Id].FreqPath = &spool
                ctx.Toss(ctx.Self.Id, DefaultNiceFreq, false, false, false, false, false, false)
                if len(dirFiles(txPath)) != 0 || len(dirFiles(rxPath)) == 0 {
                        return false