Skip to content

Commit edbd613

Browse files
Xavier DucrohetAndroid (Google) Code Review
authored andcommitted
Merge "Merge 1911a6f into gingerbread. do not merge." into gingerbread
2 parents 919853c + efe18b5 commit edbd613

File tree

12 files changed

+67
-66
lines changed

12 files changed

+67
-66
lines changed

tools/layoutlib/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
bridge/bin
2-
create/bin
1+
bin

tools/layoutlib/bridge/.classpath

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry excluding="org/kxml2/io/" kind="src" path="src"/>
4-
<classpathentry kind="src" path="tests"/>
54
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6-
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
75
<classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/layoutlib_api/layoutlib_api-prebuilt.jar"/>
86
<classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_PLAT_SRC/dalvik/libcore/xml/src/main/java"/>
97
<classpathentry kind="var" path="ANDROID_PLAT_SRC/out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar" sourcepath="/ANDROID_PLAT_SRC/frameworks/base"/>

tools/layoutlib/bridge/Android.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ LOCAL_MODULE := layoutlib
3333

3434
include $(BUILD_HOST_JAVA_LIBRARY)
3535

36+
# Build all sub-directories
37+
include $(call all-makefiles-under,$(LOCAL_PATH))
38+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5+
<classpathentry combineaccessrules="false" kind="src" path="/layoutlib_bridge"/>
6+
<classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_PLAT_SRC/dalvik/libcore/xml/src/main/java"/>
7+
<classpathentry kind="var" path="ANDROID_PLAT_SRC/out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar" sourcepath="/ANDROID_PLAT_SRC/frameworks/base"/>
8+
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
9+
<classpathentry kind="output" path="bin"/>
10+
</classpath>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>layoutlib_bridge-tests</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (C) 2011 The Android Open Source Project
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+
LOCAL_PATH := $(call my-dir)
16+
17+
include $(CLEAR_VARS)
18+
19+
# Only compile source java files in this lib.
20+
LOCAL_SRC_FILES := $(call all-java-files-under, src)
21+
22+
LOCAL_MODULE := layoutlib-tests
23+
LOCAL_MODULE_TAGS := optional
24+
25+
LOCAL_JAVA_LIBRARIES := layoutlib kxml2-2.3.0 junit
26+
27+
include $(BUILD_HOST_JAVA_LIBRARY)
28+
29+
# Build all sub-directories
30+
include $(call all-makefiles-under,$(LOCAL_PATH))

tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/NinePatchTest.java

Lines changed: 0 additions & 51 deletions
This file was deleted.
Binary file not shown.

tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/AndroidGraphicsTests.java renamed to tools/layoutlib/bridge/tests/src/android/graphics/Matrix_DelegateTest.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.android.layoutlib.bridge;
18-
19-
import android.graphics.Matrix;
20-
import android.text.TextPaint;
17+
package android.graphics;
2118

2219
import junit.framework.TestCase;
2320

2421
/**
2522
*
2623
*/
27-
public class AndroidGraphicsTests extends TestCase {
24+
public class Matrix_DelegateTest extends TestCase {
2825

2926
@Override
3027
protected void setUp() throws Exception {
@@ -36,14 +33,17 @@ protected void tearDown() throws Exception {
3633
super.tearDown();
3734
}
3835

39-
public void testMatrix() {
36+
public void testIdentity() {
4037
Matrix m1 = new Matrix();
4138

4239
assertTrue(m1.isIdentity());
4340

4441
m1.setValues(new float[] { 1,0,0, 0,1,0, 0,0,1 });
4542
assertTrue(m1.isIdentity());
43+
}
4644

45+
public void testCopyConstructor() {
46+
Matrix m1 = new Matrix();
4747
Matrix m2 = new Matrix(m1);
4848

4949
float[] v1 = new float[9];
@@ -55,9 +55,4 @@ public void testMatrix() {
5555
assertEquals(v1[i], v2[i]);
5656
}
5757
}
58-
59-
public void textTextPaint() {
60-
TextPaint p = new TextPaint();
61-
assertNotNull(p);
62-
}
6358
}

tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/TestDelegates.java renamed to tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java

File renamed without changes.

0 commit comments

Comments
 (0)