OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // This is a "No Compile Test" suite. | |
6 // http://dev.chromium.org/developers/testing/no-compile-tests | |
7 | |
8 #include "base/task_scheduler/task_traits.h" | |
9 | |
10 namespace base { | |
11 | |
12 #if defined(NCTEST_TASK_TRAITS_MULTIPLE_MAY_BLOCK) // [r"Multiple arguments of the same type were provided to the constructor of TaskTraits."] | |
13 constexpr TaskTraits traits = {MayBlock(), MayBlock()}; | |
14 #elif defined(NCTEST_TASK_TRAITS_MULTIPLE_WITH_BASE_SYNC_PRIMITIVES) // [r"Mult iple arguments of the same type were provided to the constructor of TaskTraits." ] | |
15 constexpr TaskTraits traits = {WithBaseSyncPrimitives(), | |
16 WithBaseSyncPrimitives()}; | |
17 #elif defined(NCTEST_TASK_TRAITS_MULTIPLE_TASK_PRIORITY) // [r"Multiple argumen ts of the same type were provided to the constructor of TaskTraits."] | |
18 constexpr TaskTraits traits = {TaskPriority::BACKGROUND, | |
19 TaskPriority::USER_BLOCKING}; | |
20 #elif defined(NCTEST_TASK_TRAITS_MULTIPLE_SHUTDOWN_BEHAVIOR) // [r"Multiple arg uments of the same type were provided to the constructor of TaskTraits."] | |
21 constexpr TaskTraits traits = {TaskShutdownBehavior::BLOCK_SHUTDOWN, | |
22 TaskShutdownBehavior::BLOCK_SHUTDOWN}; | |
23 #elif defined(NCTEST_TASK_TRAITS_MULTIPLE_SAME_TYPE_MIX) // [r"Multiple argumen ts of the same type were provided to the constructor of TaskTraits."] | |
24 constexpr TaskTraits traits = {TaskShutdownBehavior::BLOCK_SHUTDOWN, | |
25 MayBlock(), | |
26 TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}; | |
27 #endif | |
gab
2017/04/25 17:48:15
Also test unknown types (e.g. bool "false" or int
fdoray
2017/04/26 17:20:33
Done.
| |
28 | |
29 } // namespace base | |
OLD | NEW |