// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifdef __cplusplus #error "This file should be compiled as C, not C++." #endif #include <stddef.h> #include <stdint.h> #include <string.h> // Include all the header files that are meant to be compilable as C. Start with // core.h, since it's the most important one. #include "mojo/public/c/system/core.h" #include "mojo/public/c/system/macros.h" #include "mojo/public/c/system/thunks.h" // The joys of the C preprocessor.... #define STRINGIFY(x) … #define STRINGIFY2(x) … #define FAILURE(message) … // Makeshift gtest. #define EXPECT_EQ(a, b) … #define EXPECT_NE(a, b) … // This function exists mainly to be compiled and linked. We do some cursory // checks and call it from a unit test, to make sure that link problems aren't // missed due to deadstripping. Returns null on success and a string on failure // (describing the failure). const char* MinimalCTest(void) { … }