blob: 4ada3cd3bc1810ab0d7c9b2d66405b7d79c4f424 [file] [log] [blame]
// Copyright 2016 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build newvdltests
package vdl_test
import (
"testing"
"v.io/v23/vdl"
"v.io/v23/vdl/vdltest"
)
func TestValueReadNew(t *testing.T) {
for _, entry := range vdltest.ToEntryValues(vdltest.AllPass()) {
out := vdl.ZeroValue(entry.Target.Type())
if err := out.VDLRead(entry.Source.Decoder()); err != nil {
t.Errorf("%s: error in ValueRead: %v", entry.Name(), err)
continue
}
if !vdl.EqualValue(entry.Target, out) {
t.Errorf("%s: got %v, want %v", entry.Name(), out, entry.Target)
}
}
}