3860N/A# The contents of this file are subject to the terms of the Common Development and
3860N/A# Distribution License (the License). You may not use this file except in compliance with the
3860N/A# specific language governing permission and limitations under the License.
3860N/A# When distributing Covered Software, include this CDDL Header Notice in each file and include
3860N/A# Header, with the fields enclosed by brackets [] replaced by your own identifying
3860N/A# information: "Portions copyright [year] [name of copyright owner]".
3860N/A# Copyright 2015 ForgeRock AS.
3860N/AThis directory contains the unit tests for OpenAM Web Policy Agent.
3860N/ATests are placed in C source files and will look something like the following.
3860N/A * Test the blah functionality.
3860N/Avoid test_blah1(void** state) {
3860N/A // avoids "state not used" messages
3860N/A assert_int_equal(AM_OK, AM_OK);
3860N/Avoid test_blah2(void** state) {
3968N/AMake target "test_includes", which is a part of a global "tests" target, extracts
3860N/Aall of the test method prototypes from each of the test files and creates "
tests.h"
3860N/Aheader file. The same target automatically creates "struct CMUnitTest tests[]" object
3860N/Ato be used inside test_MAIN cmocka_run_group_tests().
3860N/AResulting test executable "test" is available under "build" directory.