Skip to content

Commit

Permalink
Add zero properties test
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiesardo committed May 31, 2016
1 parent 75595b0 commit dfc19cd
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/auto_parcel/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
(.generatesSources first (into-array JavaFileObject rest)))))))

(deftest simple
(testing "zero properties"
(check-compiles
"test.zero.Test"
"test.zero.AutoValue_Test"))
(testing "one property"
(check-compiles
"test.one.Test"
Expand Down
6 changes: 6 additions & 0 deletions test/test/zero/$AutoValue_Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package test.zero;

public abstract class $AutoValue_Test extends Test {
public $AutoValue_Test() {
}
}
39 changes: 39 additions & 0 deletions test/test/zero/AutoValue_Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package test.zero;

import android.os.Parcel;
import android.os.Parcelable;

import java.lang.ClassLoader;

final class AutoValue_Test extends $AutoValue_Test {
public static final Parcelable.Creator<AutoValue_Test> CREATOR = new Parcelable.Creator<AutoValue_Test>() {
@Override
public AutoValue_Test createFromParcel(Parcel in) {
return new AutoValue_Test(in);
}

@Override
public AutoValue_Test[] newArray(int size) {
return new AutoValue_Test[size];
}
};
private final static ClassLoader CL = AutoValue_Test.class.getClassLoader();

public AutoValue_Test() {
super();
}

private AutoValue_Test(Parcel in) {
this();
}

@Override
public int describeContents() {
return 0;
}

@Override
public void writeToParcel(Parcel dest, int flags) {

}
}
9 changes: 9 additions & 0 deletions test/test/zero/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package test.zero;

import com.google.auto.value.AutoValue;
import android.os.Parcelable;

public
@AutoValue
abstract class Test implements Parcelable {
}

0 comments on commit dfc19cd

Please sign in to comment.