1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.github.maven_nar.cpptasks.trolltech;
21
22 import com.github.maven_nar.cpptasks.compiler.AbstractProcessor;
23 import com.github.maven_nar.cpptasks.compiler.TestAbstractCompiler;
24
25
26
27
28
29 public class TestMetaObjectCompiler extends TestAbstractCompiler {
30
31
32
33
34
35
36 public TestMetaObjectCompiler(final String name) {
37 super(name);
38 }
39
40
41
42
43
44
45 @Override
46 protected AbstractProcessor create() {
47 return MetaObjectCompiler.getInstance();
48 }
49
50
51
52
53 @Override
54 public void failingtestGetOutputFileName1() {
55 final AbstractProcessor compiler = MetaObjectCompiler.getInstance();
56 String[] output = compiler.getOutputFileNames("c:/foo\\bar\\hello.cpp", null);
57 assertEquals("hello" + getObjectExtension(), output[0]);
58 output = compiler.getOutputFileNames("c:/foo\\bar/hello.cpp", null);
59 assertEquals("hello" + getObjectExtension(), output[0]);
60 output = compiler.getOutputFileNames("hello.cpp", null);
61 assertEquals("hello" + getObjectExtension(), output[0]);
62 output = compiler.getOutputFileNames("c:/foo\\bar\\hello.h", null);
63 assertEquals("moc_hello.cpp", output[0]);
64 output = compiler.getOutputFileNames("c:/foo\\bar/hello.h", null);
65 assertNull("moc_hello.cpp", output[0]);
66 }
67
68
69
70
71
72
73 @Override
74 protected String getObjectExtension() {
75 return ".moc";
76 }
77
78
79
80
81 @Override
82 public void testGetIdentfier() {
83 }
84 }