Skip to content

Commit e1e5b76

Browse files
committed
Upgrading to Robolectric 2.x.
1 parent 4ae3dc5 commit e1e5b76

File tree

187 files changed

+4906
-5081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+4906
-5081
lines changed

framework/AndroidManifest.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
android:versionCode="1"
55
android:versionName="0.0.1-SNAPSHOT" >
66

7-
<uses-sdk android:minSdkVersion="8" />
7+
<uses-sdk android:minSdkVersion="16" />
88

99
<application
1010
android:icon="@drawable/icon"
11-
android:label="@string/app_name" >
12-
<activity android:name=".HelloAndroidActivity" >
11+
android:label="@string/text" >
12+
<activity android:name=".DummyActivity" >
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN" />
1515

framework/build.gradle

+13-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ext {
3333
androidVersion = '4.1.1.4'
3434
aspectjVersion = '1.8.2'
3535

36-
robolectricVersion = '1.2'
36+
robolectricVersion = '2.3'
3737
hamcrestVersion = '1.3'
3838
commonsCollectionsVersion = '3.2.1'
3939
}
@@ -44,7 +44,7 @@ dependencies {
4444
compile "org.aspectj:aspectjrt:$aspectjVersion"
4545

4646
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
47-
//testCompile "com.pivotallabs:robolectric:$robolectricVersion"
47+
testCompile "org.robolectric:robolectric:$robolectricVersion"
4848
testCompile ("junit:junit:$junitVersion") {
4949
exclude group: 'org.hamcrest', module: 'hamcrest-core'
5050
}
@@ -53,6 +53,9 @@ dependencies {
5353
}
5454
testCompile "org.apache.commons:commons-lang3:$commonsLangVersion"
5555
testCompile "commons-collections:commons-collections:$commonsCollectionsVersion"
56+
testCompile fileTree(dir: 'libs', include: '*.jar')
57+
testCompile "org.easytesting:fest-assert-core:2.0M10"
58+
//testCompile "org.jmockit:jmockit:1.11"
5659

5760
javadocTaglet project(':javadoc-taglet')
5861

@@ -296,9 +299,13 @@ eclipse {
296299

297300
natures 'org.springsource.ide.eclipse.gradle.core.nature'
298301
natures 'org.eclipse.ajdt.ui.ajnature'
302+
natures 'com.android.ide.eclipse.adt.AndroidNature'
299303

300304
buildCommands.clear()
305+
buildCommand 'com.android.ide.eclipse.adt.ResourceManagerBuilder'
306+
buildCommand 'com.android.ide.eclipse.adt.PreCompilerBuilder'
301307
buildCommand 'org.eclipse.ajdt.core.ajbuilder'
308+
buildCommand 'com.android.ide.eclipse.adt.ApkBuilder'
302309
}
303310

304311
classpath {
@@ -310,12 +317,12 @@ eclipse {
310317
}
311318
}
312319
}
313-
/*
314320
file.withXml {
315321
def node = it.asNode()
316322

317-
node.appendNode('classpathentry kind="src" path="src/main/java"')
318-
node.appendNode('classpathentry kind="src" path="src/test/java"')
319-
}*/
323+
node.appendNode('classpathentry kind="src" path="src/integTest/java"')
324+
node.appendNode('classpathentry kind="src" path="src/funcTest/java"')
325+
node.appendNode('classpathentry kind="src" path="gen"')
326+
}
320327
}
321328
}

framework/gen/org/robobinding/R.java

+26-36
Original file line numberDiff line numberDiff line change
@@ -17,54 +17,44 @@ public static final class id {
1717
public static final int allAttributesOfAbsListView=0x7f050001;
1818
public static final int allAttributesOfAdapterView=0x7f050004;
1919
public static final int allAttributesOfExpandableListView=0x7f050006;
20-
public static final int allAttributesOfImageView=0x7f05000a;
21-
public static final int allAttributesOfListView=0x7f05000c;
22-
public static final int allAttributesOfProgressBar=0x7f05000e;
23-
public static final int allAttributesOfRatingBar=0x7f050010;
24-
public static final int allAttributesOfSeekBar=0x7f050014;
25-
public static final int allAttributesOfTextView=0x7f050016;
26-
public static final int allAttributesOfView=0x7f050018;
27-
public static final int resolutionAndBindingPhaseButton=0x7f050007;
28-
public static final int resolutionAndBindingPhaseSpinner=0x7f050008;
29-
public static final int sample_dropdown_layout=0x7f050011;
30-
public static final int sample_item_layout=0x7f050012;
20+
public static final int allAttributesOfImageView=0x7f050008;
21+
public static final int allAttributesOfListView=0x7f05000a;
22+
public static final int allAttributesOfProgressBar=0x7f05000c;
23+
public static final int allAttributesOfRatingBar=0x7f05000e;
24+
public static final int allAttributesOfSeekBar=0x7f050010;
25+
public static final int allAttributesOfTextView=0x7f050015;
26+
public static final int allAttributesOfView=0x7f050017;
27+
public static final int resolutionAndBindingPhaseButton=0x7f050011;
28+
public static final int resolutionAndBindingPhaseListView=0x7f050012;
29+
public static final int resolutionAndBindingPhaseSpinner=0x7f050013;
3130
public static final int supportedAttributesOfAbsListView=0x7f050000;
3231
public static final int supportedAttributesOfAbsSpinner=0x7f050002;
3332
public static final int supportedAttributesOfAdapterView=0x7f050003;
3433
public static final int supportedAttributesOfExpandableListView=0x7f050005;
35-
public static final int supportedAttributesOfImageView=0x7f050009;
36-
public static final int supportedAttributesOfListView=0x7f05000b;
37-
public static final int supportedAttributesOfProgressBar=0x7f05000d;
38-
public static final int supportedAttributesOfRatingBar=0x7f05000f;
39-
public static final int supportedAttributesOfSeekBar=0x7f050013;
40-
public static final int supportedAttributesOfTextView=0x7f050015;
41-
public static final int supportedAttributesOfView=0x7f050017;
34+
public static final int supportedAttributesOfImageView=0x7f050007;
35+
public static final int supportedAttributesOfListView=0x7f050009;
36+
public static final int supportedAttributesOfProgressBar=0x7f05000b;
37+
public static final int supportedAttributesOfRatingBar=0x7f05000d;
38+
public static final int supportedAttributesOfSeekBar=0x7f05000f;
39+
public static final int supportedAttributesOfTextView=0x7f050014;
40+
public static final int supportedAttributesOfView=0x7f050016;
4241
}
4342
public static final class layout {
4443
public static final int abs_list_view=0x7f030000;
4544
public static final int abs_spinner=0x7f030001;
4645
public static final int adapter_view=0x7f030002;
4746
public static final int compound_button=0x7f030003;
4847
public static final int expandable_list_view=0x7f030004;
49-
public static final int framework_error_reporting_it_sample1=0x7f030005;
50-
public static final int image_view=0x7f030006;
51-
public static final int layout1=0x7f030007;
52-
public static final int layout2=0x7f030008;
53-
public static final int list_view=0x7f030009;
54-
public static final int no_bound_views_activity=0x7f03000a;
55-
public static final int progress_bar=0x7f03000b;
56-
public static final int rating_bar=0x7f03000c;
57-
public static final int sample_dropdown_layout=0x7f03000d;
58-
public static final int sample_item_layout=0x7f03000e;
59-
public static final int seek_bar=0x7f03000f;
60-
public static final int simple_list_item_multiple_choice=0x7f030010;
61-
public static final int simple_list_item_single_choice=0x7f030011;
62-
public static final int text_view=0x7f030012;
63-
public static final int two_bound_views_activity=0x7f030013;
64-
public static final int view=0x7f030014;
48+
public static final int image_view=0x7f030005;
49+
public static final int list_view=0x7f030006;
50+
public static final int progress_bar=0x7f030007;
51+
public static final int rating_bar=0x7f030008;
52+
public static final int seek_bar=0x7f030009;
53+
public static final int test_error_reporting_sample1=0x7f03000a;
54+
public static final int text_view=0x7f03000b;
55+
public static final int view=0x7f03000c;
6556
}
6657
public static final class string {
67-
public static final int app_name=0x7f040001;
68-
public static final int hello=0x7f040000;
58+
public static final int text=0x7f040000;
6959
}
7060
}

framework/libs/android-support-v4.jar

741 KB
Binary file not shown.

framework/libs/maps.jar

26.1 KB
Binary file not shown.

framework/res/layout/framework_error_reporting_it_sample1.xml

-25
This file was deleted.

framework/res/layout/layout1.xml

-9
This file was deleted.

framework/res/layout/layout2.xml

-9
This file was deleted.

framework/res/layout/no_bound_views_activity.xml

-14
This file was deleted.

framework/res/layout/sample_dropdown_layout.xml

-7
This file was deleted.

framework/res/layout/sample_item_layout.xml

-7
This file was deleted.

framework/res/layout/simple_list_item_multiple_choice.xml

-26
This file was deleted.

framework/res/layout/simple_list_item_single_choice.xml

-26
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:bind="http://robobinding.org/android"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:orientation="vertical" >
7+
<!--
8+
1.invalid syntax on :text attribute.
9+
2.non-existing property on :visibility attribute.
10+
3.non-existing attribute of :nonExistingAttribute.
11+
-->
12+
<Button
13+
android:id="@+id/resolutionAndBindingPhaseButton"
14+
bind:text="{invalidSyntax"
15+
bind:nonExistingAttribute="{property}"
16+
17+
bind:visibility="{nonExistingProperty}"
18+
android:layout_width="wrap_content"
19+
android:layout_height="wrap_content"/>
20+
21+
<!--
22+
1.invalid syntax on :visibility attribute.
23+
2.non-existing layout property on :itemLayout attribute.
24+
-->
25+
<ListView
26+
android:id="@+id/resolutionAndBindingPhaseListView"
27+
bind:visibility="${invalidSyntax"
28+
bind:source="{source}"
29+
bind:itemLayout="{nonExistingLayoutProperty}"
30+
android:layout_width="fill_parent"
31+
android:layout_height="0px"/>
32+
33+
<!--
34+
1.invalid syntax on :visibility attribute.
35+
2.missing compulsory attributes :source and :dropdownLayout.
36+
37+
Error detected later time:
38+
1.non-existing layout property on :itemLayout attribute.
39+
-->
40+
<Spinner
41+
android:id="@+id/resolutionAndBindingPhaseSpinner"
42+
bind:visibility="${invalidSyntax"
43+
bind:itemLayout="{nonExistingLayoutProperty}"
44+
android:layout_width="fill_parent"
45+
android:layout_height="0px"/>
46+
47+
</LinearLayout>

framework/res/layout/text_view.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
android:bufferType="spannable"
1818
android:capitalize="sentences"
1919
android:cursorVisible="true"
20-
android:digits="@string/app_name"
20+
android:digits="@string/text"
2121
android:drawableBottom="@drawable/icon"
2222
android:drawableLeft="@drawable/icon"
2323
android:drawableRight="@drawable/icon"
2424
android:drawableTop="@drawable/icon"
2525
android:editable="true"
26-
android:editorExtras="@string/app_name"
26+
android:editorExtras="@string/text"
2727
android:ellipsize="start"
2828
android:ems="5"
2929
android:freezesText="true"
@@ -53,7 +53,7 @@
5353
android:numeric="decimal"
5454
android:password="true"
5555
android:phoneNumber="true"
56-
android:privateImeOptions="@string/app_name"
56+
android:privateImeOptions="@string/text"
5757
android:scrollHorizontally="true"
5858
android:selectAllOnFocus="true"
5959
android:shadowColor="@android:color/background_dark"

framework/res/layout/two_bound_views_activity.xml

-23
This file was deleted.

framework/res/layout/view.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
android:scrollbarTrackVertical="@drawable/icon"
6868
android:scrollbars="horizontal"
6969
android:soundEffectsEnabled="true"
70-
android:tag="@string/app_name"
70+
android:tag="@string/text"
7171
android:visibility="visible" >
7272

7373
<!--

0 commit comments

Comments
 (0)