Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLSimpleTestSuite.java @ 16067:915ebb306fcc
Truffle/Source: major API revision
- All source-related classes now in com.oracle.truffle.api.source
- SourceFactory replaced with factory methods on Source
- Revision, renaming, and documentation to methods on Source and SourceSection
- NullSourceSection is now a utility class
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Fri, 06 Jun 2014 17:51:47 -0700 |
parents | 4eda2fa64da6 |
children |
rev | line source |
---|---|
13809
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
1 /* |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
4 * |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
8 * |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
13 * accompanied this code). |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
14 * |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
18 * |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
21 * questions. |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
22 */ |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
23 package com.oracle.truffle.sl.test; |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
24 |
13961
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
25 import org.junit.*; |
13809
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
26 import org.junit.runner.*; |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
27 |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
28 @RunWith(SLTestRunner.class) |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
29 @SLTestSuite({"graal/com.oracle.truffle.sl.test/tests", "tests"}) |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
30 public class SLSimpleTestSuite { |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
31 |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
32 public static void main(String[] args) throws Exception { |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
33 SLTestRunner.runInMain(SLSimpleTestSuite.class, args); |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
34 } |
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
35 |
13961
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
36 /* |
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
37 * Our "mx unittest" command looks for methods that are annotated with @Test. By just defining |
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
38 * an empty method, this class gets included and the test suite is properly executed. |
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
39 */ |
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
40 @Test |
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
41 public void unittest() { |
4eda2fa64da6
SL: Run test as part of "mx unittest"
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13809
diff
changeset
|
42 } |
13809
030e75d4d7dc
SL: added junit integration for external tests.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
43 } |