diff options
Diffstat (limited to 'src/pal/tests/palsuite/samples/test1')
-rw-r--r-- | src/pal/tests/palsuite/samples/test1/CMakeLists.txt | 19 | ||||
-rw-r--r-- | src/pal/tests/palsuite/samples/test1/test.c | 41 | ||||
-rw-r--r-- | src/pal/tests/palsuite/samples/test1/testinfo.dat | 14 |
3 files changed, 74 insertions, 0 deletions
diff --git a/src/pal/tests/palsuite/samples/test1/CMakeLists.txt b/src/pal/tests/palsuite/samples/test1/CMakeLists.txt new file mode 100644 index 0000000000..da5892cfa6 --- /dev/null +++ b/src/pal/tests/palsuite/samples/test1/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8.12.2) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(SOURCES + test.c +) + +add_executable(paltest_samples_test1 + ${SOURCES} +) + +add_dependencies(paltest_samples_test1 coreclrpal) + +target_link_libraries(paltest_samples_test1 + pthread + m + coreclrpal +) diff --git a/src/pal/tests/palsuite/samples/test1/test.c b/src/pal/tests/palsuite/samples/test1/test.c new file mode 100644 index 0000000000..2eed6f6f44 --- /dev/null +++ b/src/pal/tests/palsuite/samples/test1/test.c @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +/*============================================================================ +** +** Source: test.c +** +** Purpose: This test is an example of the basic structure of a PAL test +** suite test case. +** +** +**==========================================================================*/ + +#include <palsuite.h> + +int __cdecl main(int argc, char **argv) +{ + /* Initialize the PAL. + */ + if(0 != PAL_Initialize(argc, argv)) + { + return FAIL; + } + + Trace("\nTest #1...\n"); + +#ifdef WIN32 + Trace("\nWe are testing under Win32 environment.\n"); +#else + Trace("\nWe are testing under Non-Win32 environment.\n"); +#endif + + Trace("\nThis test has passed.\n"); + + /* Shutdown the PAL. + */ + PAL_Terminate(); + + return PASS; +} diff --git a/src/pal/tests/palsuite/samples/test1/testinfo.dat b/src/pal/tests/palsuite/samples/test1/testinfo.dat new file mode 100644 index 0000000000..0459d24d63 --- /dev/null +++ b/src/pal/tests/palsuite/samples/test1/testinfo.dat @@ -0,0 +1,14 @@ +# Licensed to the .NET Foundation under one or more agreements. +# The .NET Foundation licenses this file to you under the MIT license. +# See the LICENSE file in the project root for more information. + +Version = 1.0 +Section = Samples +Function = sample +Name = Sample Test #1 +TYPE = DEFAULT +EXE1 = test +Description +=This is a sample test case. It will always pass. + + |