1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @fileoverview Assertion support.
10 * Simple common assertion API
11 * @param {*} condition The condition to test. Note that this may be used to
12 * test whether a value is defined or not, and we don't want to force a
14 * @param {string=} opt_message A message to use in any error.
16 function assert(condition, opt_message) {
19 var msg = 'Assertion failed';
21 msg = msg + ': ' + opt_message;