Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / unittests / IR / CoreBindings.cpp
blob037926462c792dc9fb7cdc558cee636aa6de6883
1 //===- llvm/unittest/IR/CoreBindings.cpp - Tests for C-API bindings -------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm-c/Core.h"
10 #include "llvm/Config/llvm-config.h"
11 #include "gtest/gtest.h"
13 namespace {
15 TEST(CoreBindings, VersionTest) {
16 // Test ability to ignore output parameters
17 LLVMGetVersion(nullptr, nullptr, nullptr);
19 unsigned Major, Minor, Patch;
20 LLVMGetVersion(&Major, &Minor, &Patch);
21 EXPECT_EQ(Major, (unsigned)LLVM_VERSION_MAJOR);
22 EXPECT_EQ(Minor, (unsigned)LLVM_VERSION_MINOR);
23 EXPECT_EQ(Patch, (unsigned)LLVM_VERSION_PATCH);
26 } // end anonymous namespace