Feature.java revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2012 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
5package org.chromium.base.test.util;
6
7import java.lang.annotation.ElementType;
8import java.lang.annotation.Retention;
9import java.lang.annotation.RetentionPolicy;
10import java.lang.annotation.Target;
11
12/**
13 * The java instrumentation tests are normally fairly large (in terms of
14 * dependencies), and the test suite ends up containing a large amount of
15 * tests that are not trivial to filter / group just by their names.
16 * Instead, we use this annotation: each test should be annotated as:
17 *     @Feature({"Foo", "Bar"})
18 * in order for the test runner scripts to be able to filter and group
19 * them accordingly (for instance, this enable us to run all tests that exercise
20 * feature Foo).
21 */
22@Target(ElementType.METHOD)
23@Retention(RetentionPolicy.RUNTIME)
24public @interface Feature {
25    /**
26     * @return A list of feature names.
27     */
28    public String[] value();
29}
30