//===-- Unittests for Optional --------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "src/__support/CPP/optional.h" #include "test/UnitTest/Test.h" nullopt; optional; // This class has three properties for testing: // 1) No default constructor. // 2) A non-trivial destructor with an observable side-effect. // 3) Functions that can be called explicitly. class Contrived { … }; TEST(LlvmLibcOptionalTest, Tests) { … }