chromium/mojo/public/c/system/tests/core_api_unittest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

// This file tests the C API.

#include "mojo/public/c/system/core.h"

#include <stdint.h>
#include <string.h>

#include "mojo/core/embedder/embedder.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "mojo/public/cpp/system/wait.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace mojo {
namespace {

const MojoHandleSignals kSignalReadadableWritable =;

const MojoHandleSignals kSignalAll =;

TEST(CoreAPITest, GetTimeTicksNow) {}

// The only handle that's guaranteed to be invalid is |MOJO_HANDLE_INVALID|.
// Tests that everything that takes a handle properly recognizes it.
TEST(CoreAPITest, InvalidHandle) {}

TEST(CoreAPITest, BasicMessagePipe) {}

TEST(CoreAPITest, BasicDataPipe) {}

TEST(CoreAPITest, BasicSharedBuffer) {}

// Defined in core_unittest_pure_c.c.
extern "C" const char* MinimalCTest(void);

// This checks that things actually work in C (not C++).
TEST(CoreAPITest, MinimalCTest) {}

// TODO(vtl): Add multi-threaded tests.

}  // namespace
}  // namespace mojo