Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:35

0001 #include <rtems/test.h>
0002 
0003 T_TEST_CASE(verbosity_changes)
0004 {
0005     T_verbosity verbosity;
0006 
0007     verbosity = T_set_verbosity(T_QUIET);
0008     T_true(true, "quiet: check passes -> no output");
0009     T_true(false, "quiet: check fails -> no output");
0010     T_set_verbosity(T_NORMAL);
0011     T_true(true, "normal: check passes -> no output");
0012     T_true(false, "normal: check fails -> with output");
0013     T_set_verbosity(T_VERBOSE);
0014     T_true(true, "verbose: check passes -> with output");
0015     T_true(false, "verbose: check fails -> with output");
0016     T_set_verbosity(verbosity);
0017 }
0018 
0019 #include "t-self-test.h"
0020 
0021 T_TEST_OUTPUT(verbosity_changes,
0022 "B:verbosity_changes\n"
0023 "F:3:0:UI1:test-verbosity.c:12:normal: check fails -> with output\n"
0024 "P:4:0:UI1:test-verbosity.c:14\n"
0025 "F:5:0:UI1:test-verbosity.c:15:verbose: check fails -> with output\n"
0026 "E:verbosity_changes:N:6:F:3:D:0.001000\n");
0027 
0028 /*
0029  * The license is at the end of the file to be able to use the test code and
0030  * output in examples in the documentation.  This is also the reason for the
0031  * dual licensing.  The license for RTEMS documentation is CC-BY-SA-4.0.
0032  */
0033 
0034 /*
0035  * SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
0036  *
0037  * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
0038  *
0039  * Redistribution and use in source and binary forms, with or without
0040  * modification, are permitted provided that the following conditions
0041  * are met:
0042  * 1. Redistributions of source code must retain the above copyright
0043  *    notice, this list of conditions and the following disclaimer.
0044  * 2. Redistributions in binary form must reproduce the above copyright
0045  *    notice, this list of conditions and the following disclaimer in the
0046  *    documentation and/or other materials provided with the distribution.
0047  *
0048  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0049  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0050  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0051  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0052  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0053  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0054  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0055  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0056  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0057  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0058  * POSSIBILITY OF SUCH DAMAGE.
0059  *
0060  * ALTERNATIVELY, this software may be distributed under the terms of the
0061  * Creative Commons Attribution-ShareAlike 4.0 International Public License as
0062  * published by Creative Commons, PO Box 1866, Mountain View, CA 94042
0063  * (https://creativecommons.org/licenses/by-sa/4.0/legalcode).
0064  */