Jiri Simsa | d7616c9 | 2015-03-24 23:44:30 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Vanadium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Matt Rosencrantz | 1932912 | 2015-01-23 22:18:49 -0800 | [diff] [blame] | 5 | package fake_test |
| 6 | |
| 7 | import ( |
| 8 | "testing" |
| 9 | |
Jiri Simsa | 6ac9522 | 2015-02-23 16:11:49 -0800 | [diff] [blame] | 10 | "v.io/v23" |
Matt Rosencrantz | 1932912 | 2015-01-23 22:18:49 -0800 | [diff] [blame] | 11 | |
Jiri Simsa | ffceefa | 2015-02-28 11:03:34 -0800 | [diff] [blame] | 12 | _ "v.io/x/ref/profiles/fake" |
Matt Rosencrantz | 1932912 | 2015-01-23 22:18:49 -0800 | [diff] [blame] | 13 | ) |
| 14 | |
| 15 | // Ensure that the fake profile can be used to initialize a fake runtime. |
| 16 | func TestInit(t *testing.T) { |
Jiri Simsa | 6ac9522 | 2015-02-23 16:11:49 -0800 | [diff] [blame] | 17 | ctx, shutdown := v23.Init() |
Matt Rosencrantz | 1932912 | 2015-01-23 22:18:49 -0800 | [diff] [blame] | 18 | defer shutdown() |
| 19 | |
| 20 | if !ctx.Initialized() { |
| 21 | t.Errorf("Got uninitialized context from Init.") |
| 22 | } |
| 23 | } |