| // Copyright 2015 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. |
| "v.io/x/ref/lib/vdl/compile" |
| func TestError(t *testing.T) { |
| NamePos: compile.NamePos{ |
| ID: "v.io/x/ref/lib/vdl/codegen/javascript.Test", |
| RetryCode: vdl.WireRetryCodeNoRetry, |
| Params: []*compile.Field{ |
| NamePos: compile.NamePos{ |
| NamePos: compile.NamePos{ |
| Formats: []compile.LangFmt{ |
| Lang: i18n.LangID("en-US"), |
| result := generateErrorConstructor(names, e) |
| expected := `module.exports.TestError = makeError('v.io/x/ref/lib/vdl/codegen/javascript.Test', actions.NO_RETRY, { |
| 'en-US': 'english string', |
| t.Errorf("got %s, expected %s", result, expected) |