24 lines
304 B
Go
24 lines
304 B
Go
package proto
|
|
|
|
import (
|
|
"encoding/json"
|
|
"log"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestReadJson(t *testing.T) {
|
|
con, err := os.ReadFile("../testdata/prot1.json")
|
|
if err != nil {
|
|
log.Fatalf("Could not read file %v", err)
|
|
}
|
|
|
|
pc := &ProtoComplete{}
|
|
|
|
json.Unmarshal(con, pc)
|
|
|
|
log.Printf("%v", pc)
|
|
|
|
t.Fail()
|
|
}
|