summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Wilson <jesse@swank.ca>2009-09-27 21:17:41 +0000
committerJesse Wilson <jesse@swank.ca>2009-09-27 21:17:41 +0000
commitae2c913b6ab542aa159c972a00305dc493f61c9f (patch)
tree4d50183ed614cdccf39c168c5430c8b53ffc14af
parentc5b72dc71e39dd0408e6b90ac670f57ccae409ae (diff)
downloadplatform_external_jsr330-ae2c913b6ab542aa159c972a00305dc493f61c9f.tar.gz
platform_external_jsr330-ae2c913b6ab542aa159c972a00305dc493f61c9f.tar.bz2
platform_external_jsr330-ae2c913b6ab542aa159c972a00305dc493f61c9f.zip
An early draft of the JSR 330 TCK. Most checks haven't been added yet.
git-svn-id: https://atinject.googlecode.com/svn/trunk@28 3bc8319c-20ab-11de-9edc-3f40a397ab60
-rw-r--r--atinject.ipr10
-rw-r--r--tck/com/googlecode/atinject/Candidate.java45
-rw-r--r--tck/com/googlecode/atinject/Tck.java72
-rw-r--r--tck/com/googlecode/atinject/Tester.java58
-rw-r--r--tck/com/googlecode/atinject/auto/Car.java28
-rw-r--r--tck/com/googlecode/atinject/auto/Convertible.java74
-rw-r--r--tck/com/googlecode/atinject/auto/Drivers.java26
-rw-r--r--tck/com/googlecode/atinject/auto/DriversSeat.java21
-rw-r--r--tck/com/googlecode/atinject/auto/Engine.java22
-rw-r--r--tck/com/googlecode/atinject/auto/FuelTank.java21
-rw-r--r--tck/com/googlecode/atinject/auto/Seat.java24
-rw-r--r--tck/com/googlecode/atinject/auto/Seatbelt.java21
-rw-r--r--tck/com/googlecode/atinject/auto/Tire.java22
-rw-r--r--tck/com/googlecode/atinject/auto/V8Engine.java21
-rw-r--r--tck/com/googlecode/atinject/auto/Vin.java25
-rw-r--r--tck/com/googlecode/atinject/auto/accessories/Cupholder.java22
-rw-r--r--tck/com/googlecode/atinject/auto/accessories/SpareTire.java23
-rw-r--r--tck/tck.iml13
18 files changed, 544 insertions, 4 deletions
diff --git a/atinject.ipr b/atinject.ipr
index b8fd738..4308036 100644
--- a/atinject.ipr
+++ b/atinject.ipr
@@ -50,8 +50,8 @@
<component name="IdProvider" IDEtalkID="293ECBF8C3B5C62E10353C1DB8516323" />
<component name="InspectionProjectProfileManager">
<option name="PROJECT_PROFILE" value="Project Default" />
- <option name="USE_PROJECT_PROFILE" value="true" />
- <version value="1.0" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ <scopes />
<profiles>
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
@@ -223,11 +223,12 @@
</component>
<component name="ProjectFileVersion" converted="true" />
<component name="ProjectKey">
- <option name="state" value="project:///Users/crazybob/projects/atinject/atinject.ipr" />
+ <option name="state" value="https://atinject.googlecode.com/svn/trunk/atinject.ipr" />
</component>
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/atinject.iml" filepath="$PROJECT_DIR$/atinject.iml" />
+ <module fileurl="file://$PROJECT_DIR$/tck/tck.iml" filepath="$PROJECT_DIR$/tck/tck.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
@@ -249,9 +250,10 @@
</component>
<component name="SvnBranchConfigurationManager">
<option name="myVersion" value="124" />
+ <option name="mySupportsUserInfoFilter" value="true" />
</component>
<component name="VcsDirectoryMappings">
- <mapping directory="" vcs="" />
+ <mapping directory="" vcs="svn" />
</component>
</project>
diff --git a/tck/com/googlecode/atinject/Candidate.java b/tck/com/googlecode/atinject/Candidate.java
new file mode 100644
index 0000000..75e8192
--- /dev/null
+++ b/tck/com/googlecode/atinject/Candidate.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject;
+
+import com.googlecode.atinject.auto.Car;
+
+/**
+ * An injector with the following configuration:
+ *
+ * <ul>
+ * <li>{@link com.googlecode.atinject.auto.Car} is implemented by
+ * {@link com.googlecode.atinject.auto.Convertible Convertible}.
+ * <li>{@link com.googlecode.atinject.auto.Drivers @Drivers} {@link com.googlecode.atinject.auto.Seat Seat} is
+ * implemented by {@link com.googlecode.atinject.auto.DriversSeat DriversSeat}.
+ * <li>{@link com.googlecode.atinject.auto.Engine Engine} is implemented by
+ * {@link com.googlecode.atinject.auto.V8Engine V8Engine}.
+ * <li>{@link javax.inject.Named @Named("spare")} {@link com.googlecode.atinject.auto.Tire Tire} is implemented by
+ * {@link com.googlecode.atinject.auto.accessories.SpareTire SpareTire}.
+ * <li>The following concrete classes may also be injected: {@link com.googlecode.atinject.auto.accessories.Cupholder
+ * Cupholder}, {@link com.googlecode.atinject.auto.Tire Tire} and {@link com.googlecode.atinject.auto.FuelTank
+ * FuelTank}.
+ * </ul>
+ */
+public interface Candidate {
+
+ /**
+ * Returns an injected car instance.
+ */
+ public Car getCar();
+}
diff --git a/tck/com/googlecode/atinject/Tck.java b/tck/com/googlecode/atinject/Tck.java
new file mode 100644
index 0000000..8a1a31e
--- /dev/null
+++ b/tck/com/googlecode/atinject/Tck.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject;
+
+import com.googlecode.atinject.auto.Car;
+
+public class Tck {
+
+ private final Candidate candidate;
+
+ public Tck(Candidate candidate) {
+ this.candidate = candidate;
+ }
+
+ private boolean testCompatibility() {
+ Tester tester = new Tester();
+
+ Car car;
+ try {
+ car = candidate.getCar();
+ } catch (Throwable e) {
+ System.out.println("FAIL!");
+ e.printStackTrace();
+ return false;
+ }
+
+ if (car == null) {
+ tester.addProblem("Expected non-null result from Candidate.getCar()");
+ } else {
+ car.check(tester);
+ }
+
+ if (!tester.hasProblems()) {
+ System.out.println("SUCCESS!");
+ return true;
+ }
+
+ System.out.println("FAIL!");
+ for (String problem : tester.problems()) {
+ System.out.println(problem);
+ }
+ return false;
+ }
+
+ public static void main(String[] args)
+ throws ClassNotFoundException, IllegalAccessException, InstantiationException {
+ if (args.length != 1) {
+ System.out.println("Usage: Tck <candidate>");
+ return;
+ }
+
+ Class<?> c = Class.forName(args[0]);
+ Candidate candidate = (Candidate) c.newInstance();
+ boolean success = new Tck(candidate).testCompatibility();
+ System.exit(success ? 0 : 1);
+ }
+}
diff --git a/tck/com/googlecode/atinject/Tester.java b/tck/com/googlecode/atinject/Tester.java
new file mode 100644
index 0000000..898f2a8
--- /dev/null
+++ b/tck/com/googlecode/atinject/Tester.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class Tester {
+ private final List<String> problems = new ArrayList<String>();
+
+ /**
+ * @param problem a description of what went wrong; often of the form,
+ * "Expected two injections to yield the same instance of Vin".
+ */
+ public void addProblem(String problem) {
+ problems.add(problem);
+ }
+
+ /**
+ * Adds a problem if {@code condition} is not true.
+ *
+ * @param problem a description of what went wrong; often of the form,
+ * "Expected two injections to yield the same instance of Vin".
+ */
+ public void test(boolean condition, String problem) {
+ if (!condition) {
+ problems.add(problem);
+ }
+ }
+
+ public boolean hasProblems() {
+ return !problems.isEmpty();
+ }
+
+ public Iterable<String> problems() {
+ return problems;
+ }
+
+ public void addProblems(Collection<String> problems) {
+ this.problems.addAll(problems);
+ }
+}
diff --git a/tck/com/googlecode/atinject/auto/Car.java b/tck/com/googlecode/atinject/auto/Car.java
new file mode 100644
index 0000000..77185b9
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Car.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+import com.googlecode.atinject.Tester;
+
+public interface Car {
+
+ /**
+ * Validates that this object was injected correctly.
+ */
+ void check(Tester tester);
+}
diff --git a/tck/com/googlecode/atinject/auto/Convertible.java b/tck/com/googlecode/atinject/auto/Convertible.java
new file mode 100644
index 0000000..04788bd
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Convertible.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+import com.googlecode.atinject.Tester;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Convertible implements Car {
+
+ private static final V8Engine NEVER_INJECTED = new V8Engine();
+
+ @Inject V8Engine engineA = NEVER_INJECTED;
+
+ @Inject DriversSeat driversSeatA;
+ @Inject DriversSeat driversSeatB;
+
+ private boolean constructorInjected = false;
+ private boolean methodsInjected = false;
+
+ private List<String> moreProblems = new ArrayList<String>();
+
+
+ @Inject Convertible(Seat a, Seat b, Seat c) {
+ if (methodsInjected) {
+ moreProblems.add("Expected constructor to be injected before methods");
+ }
+ if (engineA != NEVER_INJECTED) {
+ moreProblems.add("Expected constructor to be injected before fields");
+ }
+ constructorInjected = true;
+ }
+
+ Convertible() {}
+
+ @Inject void injectSomeStuff(Seat a, Seat b) {
+ if (methodsInjected) {
+ moreProblems.add("Expected methods to be injected only once");
+ }
+ if (engineA == NEVER_INJECTED) {
+ moreProblems.add("Expected fields to be injected before methods");
+ }
+ methodsInjected = true;
+ }
+
+ public void check(Tester tester) {
+ tester.addProblems(moreProblems);
+
+ // values are injected
+ tester.test(constructorInjected, "Expected constructor to be injected");
+ tester.test(methodsInjected, "Expected methods to be injected");
+ tester.test(engineA != NEVER_INJECTED, "Expected fields to be injected");
+
+ // singleton is not @Inherited
+ tester.test(driversSeatA != driversSeatB, "Expected @Singleton to not be inherited");
+ }
+}
diff --git a/tck/com/googlecode/atinject/auto/Drivers.java b/tck/com/googlecode/atinject/auto/Drivers.java
new file mode 100644
index 0000000..f59c3fa
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Drivers.java
@@ -0,0 +1,26 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME) @Qualifier
+public @interface Drivers {
+}
diff --git a/tck/com/googlecode/atinject/auto/DriversSeat.java b/tck/com/googlecode/atinject/auto/DriversSeat.java
new file mode 100644
index 0000000..521fc0f
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/DriversSeat.java
@@ -0,0 +1,21 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+public class DriversSeat extends Seat {
+}
diff --git a/tck/com/googlecode/atinject/auto/Engine.java b/tck/com/googlecode/atinject/auto/Engine.java
new file mode 100644
index 0000000..14fd19a
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Engine.java
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+public abstract class Engine {
+
+}
diff --git a/tck/com/googlecode/atinject/auto/FuelTank.java b/tck/com/googlecode/atinject/auto/FuelTank.java
new file mode 100644
index 0000000..49eaae2
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/FuelTank.java
@@ -0,0 +1,21 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+public class FuelTank {
+}
diff --git a/tck/com/googlecode/atinject/auto/Seat.java b/tck/com/googlecode/atinject/auto/Seat.java
new file mode 100644
index 0000000..be61b2c
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Seat.java
@@ -0,0 +1,24 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+import javax.inject.Singleton;
+
+@Singleton
+public class Seat {
+}
diff --git a/tck/com/googlecode/atinject/auto/Seatbelt.java b/tck/com/googlecode/atinject/auto/Seatbelt.java
new file mode 100644
index 0000000..b2188f9
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Seatbelt.java
@@ -0,0 +1,21 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+public class Seatbelt {
+}
diff --git a/tck/com/googlecode/atinject/auto/Tire.java b/tck/com/googlecode/atinject/auto/Tire.java
new file mode 100644
index 0000000..7fa1423
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Tire.java
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+public class Tire {
+
+}
diff --git a/tck/com/googlecode/atinject/auto/V8Engine.java b/tck/com/googlecode/atinject/auto/V8Engine.java
new file mode 100644
index 0000000..b273e69
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/V8Engine.java
@@ -0,0 +1,21 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+public class V8Engine extends Engine {
+}
diff --git a/tck/com/googlecode/atinject/auto/Vin.java b/tck/com/googlecode/atinject/auto/Vin.java
new file mode 100644
index 0000000..cde592c
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/Vin.java
@@ -0,0 +1,25 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto;
+
+public class Vin {
+
+ static Integer nextVin() {
+ return 0;
+ }
+}
diff --git a/tck/com/googlecode/atinject/auto/accessories/Cupholder.java b/tck/com/googlecode/atinject/auto/accessories/Cupholder.java
new file mode 100644
index 0000000..b024eb6
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/accessories/Cupholder.java
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto.accessories;
+
+public class Cupholder {
+
+}
diff --git a/tck/com/googlecode/atinject/auto/accessories/SpareTire.java b/tck/com/googlecode/atinject/auto/accessories/SpareTire.java
new file mode 100644
index 0000000..75df6dd
--- /dev/null
+++ b/tck/com/googlecode/atinject/auto/accessories/SpareTire.java
@@ -0,0 +1,23 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.googlecode.atinject.auto.accessories;
+
+import com.googlecode.atinject.auto.Tire;
+
+public class SpareTire extends Tire {
+}
diff --git a/tck/tck.iml b/tck/tck.iml
new file mode 100644
index 0000000..bddcdf8
--- /dev/null
+++ b/tck/tck.iml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="atinject" />
+ </component>
+</module>
+