Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Support new type in bundles #1651

Conversation

shiraji
Copy link
Contributor

@shiraji shiraji commented Dec 14, 2015

see #1577

@shiraji
Copy link
Contributor Author

shiraji commented Dec 14, 2015

As we discuss in the chat room, we need to think more test cases for this pull request. (or comment on SaveInstanceStateActivityParameterizedTest)

@@ -183,4 +190,7 @@

@InstanceState
ParcelerBean parcelerBean;

@InstanceState
SparseArray<MyGenericParcelableBean<Integer>> mySparseParcelableArray;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a comment for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@shiraji
Copy link
Contributor Author

shiraji commented Dec 14, 2015

I created compiling test cases for failing cases, since I don't believe my manual tests.

@WonderCsabo
Copy link
Member

Great. But let's add a positive test-case and check the generated code is right, then.

@shiraji
Copy link
Contributor Author

shiraji commented Dec 14, 2015

Cool. I will add them tomorrow.

@shiraji
Copy link
Contributor Author

shiraji commented Dec 15, 2015

There you go.

public class BundleSparseArrayCompileSuccessActivity extends Activity {

@InstanceState
SparseArray<Parcelable> mSparseArrayWithParcelable;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use this naming convention.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I will fix that and another one.

@WonderCsabo
Copy link
Member

Looks good. Can you squash the commits?

@shiraji shiraji force-pushed the 1577_support_new_type_in_bundles branch from 8ca57cd to 43d4878 Compare December 15, 2015 23:05
@shiraji
Copy link
Contributor Author

shiraji commented Dec 15, 2015

Squashed.

@Test
public void compileSuccessForBundleSparseArray() {
CompileResult result = compileFiles(BundleSparseArrayCompileSuccessActivity.class);
assertCompilationSuccessful(result);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, i think i was not clear. Please add assertGeneratedClassContains() here to actually check the correct method call was generated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@WonderCsabo
Copy link
Member

Nice. Please squash the last commit and this is can be merged.

@shiraji shiraji force-pushed the 1577_support_new_type_in_bundles branch from 771371e to 78ed909 Compare December 16, 2015 15:48
@shiraji
Copy link
Contributor Author

shiraji commented Dec 16, 2015

Squashed!

WonderCsabo added a commit that referenced this pull request Dec 16, 2015
@WonderCsabo WonderCsabo merged commit 760ac59 into androidannotations:develop Dec 16, 2015
@WonderCsabo
Copy link
Member

Great job, thanks!

@WonderCsabo WonderCsabo added this to the 4.0 milestone Dec 16, 2015
@shiraji
Copy link
Contributor Author

shiraji commented Dec 16, 2015

NP! Thanks for your help!

@shiraji shiraji deleted the 1577_support_new_type_in_bundles branch December 17, 2015 04:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants