diff options
Diffstat (limited to 'tests/src/Simple/StaticLibrary/StaticLibrary.cpp')
-rw-r--r-- | tests/src/Simple/StaticLibrary/StaticLibrary.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/src/Simple/StaticLibrary/StaticLibrary.cpp b/tests/src/Simple/StaticLibrary/StaticLibrary.cpp new file mode 100644 index 000000000..25674cf25 --- /dev/null +++ b/tests/src/Simple/StaticLibrary/StaticLibrary.cpp @@ -0,0 +1,23 @@ +// 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. + +#include "stdio.h" + +extern "C" int Add(int a, int b); +extern "C" int Subtract(int a, int b); +extern "C" bool Not(bool b); + +int main() +{ + if (Add(2, 3) != 5) + return 1; + + if (Subtract(3, 1) != 2) + return 1; + + if (!Not(false)) + return 1; + + return 100; +} |