uncommenting testing code

This commit is contained in:
2025-01-07 20:19:47 +00:00
parent 07dd26e11f
commit ea8e7d4073
10 changed files with 645 additions and 644 deletions

View File

@@ -1,40 +1,40 @@
package generate
// import (
// "fmt"
// "github.com/Akilan1999/p2p-rendering-computation/config"
// "testing"
// )
//
// type CustomConfig struct {
// Test string
// }
//
// // Test case to generate defaults with custom data-structure
// func TestSetDefaults(t *testing.T) {
// setDefaults, err := SetDefaults("", true, &CustomConfig{Test: "lol"}, true)
// if err != nil {
// fmt.Println(err)
// t.Fail()
// return
// }
//
// fmt.Println(setDefaults)
//
// var c CustomConfig
//
// _, err = config.ConfigInit(nil, &c)
// if err != nil {
// fmt.Println(err)
// t.Fail()
// return
// }
//
// fmt.Println(c)
//
// }
//
// // Test case to generate public and private keys
// func TestGeneratePublicAndPrivateKeys(t *testing.T) {
// MakeSSHKeyPair("test.pub", "test.prv")
// }
import (
"fmt"
"github.com/Akilan1999/p2p-rendering-computation/config"
"testing"
)
type CustomConfig struct {
Test string
}
// Test case to generate defaults with custom data-structure
func TestSetDefaults(t *testing.T) {
setDefaults, err := SetDefaults("", true, &CustomConfig{Test: "lol"}, true)
if err != nil {
fmt.Println(err)
t.Fail()
return
}
fmt.Println(setDefaults)
var c CustomConfig
_, err = config.ConfigInit(nil, &c)
if err != nil {
fmt.Println(err)
t.Fail()
return
}
fmt.Println(c)
}
// Test case to generate public and private keys
func TestGeneratePublicAndPrivateKeys(t *testing.T) {
MakeSSHKeyPair("test.pub", "test.prv")
}