summaryrefslogtreecommitdiff
path: root/test/is_enabled_error.c
blob: 3fcd80afe049a91b01d9fed88e760157d7234e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright 2019 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * Test the IS_ENABLED macro fails on unexpected input.
 */
#include "common.h"
#include "test_util.h"

#define	CONFIG_VALUE		TEST_VALUE

static int test_invalid_value(void)
{
	/* This will cause a compilation error */
	TEST_ASSERT(IS_ENABLED(CONFIG_VALUE) == 0);

	return EC_ERROR_UNKNOWN;
}

void run_test(int argc, char **argv)
{
	test_reset();

	RUN_TEST(test_invalid_value);

	test_print_result();
}