misc/vim: inform the user when no results are found
[nit.git] / lib / test_suite.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # Common interface for `nitunit` test-suites.
16 module test_suite is
17 # Annotation used by test-suite modules.
18 new_annotation test_suite
19 end
20
21 # A test-suite that can be executed by `nitunit`.
22 #
23 # All test-suite classes must implement `TestSuite`.
24 class TestSuite
25 # Internal empty init.
26 private init nitunit do end
27
28 # Method called before each test-case.
29 #
30 # Redefine this method to factorize code that have to be
31 # executed before every test.
32 fun before_test do end
33
34 # Method called after each test-case.
35 #
36 # Redefine this method to factorize code that have to be
37 # executed after every test.
38 fun after_test do end
39 end
40
41 # Method called before each test-suite.
42 #
43 # Redefine this method to factorize code that have to be
44 # executed before every test suite.
45 fun before_module do end
46
47 # Method called after each test-suite.
48 #
49 # Redefine this method to factorize code that have to be
50 # executed after every test suite.
51 fun after_module do end