|
| 1 | +/************************************************************************* |
| 2 | +** |
| 3 | +** GSC-18128-1, "Core Flight Executive Version 6.7" |
| 4 | +** |
| 5 | +** Copyright (c) 2006-2019 United States Government as represented by |
| 6 | +** the Administrator of the National Aeronautics and Space Administration. |
| 7 | +** All Rights Reserved. |
| 8 | +** |
| 9 | +** Licensed under the Apache License, Version 2.0 (the "License"); |
| 10 | +** you may not use this file except in compliance with the License. |
| 11 | +** You may obtain a copy of the License at |
| 12 | +** |
| 13 | +** http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | +** |
| 15 | +** Unless required by applicable law or agreed to in writing, software |
| 16 | +** distributed under the License is distributed on an "AS IS" BASIS, |
| 17 | +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | +** See the License for the specific language governing permissions and |
| 19 | +** limitations under the License. |
| 20 | +** |
| 21 | +** File: es_test.c |
| 22 | +** |
| 23 | +** Purpose: |
| 24 | +** Functional test of basic ES APIs |
| 25 | +** |
| 26 | +** Demonstration of how to register and use the UT assert functions. |
| 27 | +** |
| 28 | +*************************************************************************/ |
| 29 | + |
| 30 | +/* |
| 31 | + * Includes |
| 32 | + */ |
| 33 | + |
| 34 | +#include "cfe_test.h" |
| 35 | + |
| 36 | + |
| 37 | +void ES_Test_AppId(void) |
| 38 | +{ |
| 39 | + uint32 AppId; |
| 40 | + char AppNameBuf[OS_MAX_API_NAME+4]; |
| 41 | + |
| 42 | + UtAssert_INT32_EQ(CFE_ES_GetAppID(&AppId), CFE_SUCCESS); |
| 43 | + UtAssert_INT32_EQ(CFE_ES_GetAppName(AppNameBuf, AppId, sizeof(AppNameBuf)), CFE_SUCCESS); |
| 44 | + UtAssert_StrCmp(AppNameBuf, "ASSERT_APP", "CFE_ES_GetAppName() returned ASSERT_APP"); |
| 45 | +} |
| 46 | + |
0 commit comments