Fair enough. I'll just stub out my use of certain Android APIs so I can test
my code in a debugger.
Shane

On Sat, Sep 27, 2008 at 1:32 AM, Romain Guy <[EMAIL PROTECTED]> wrote:

>
> There is another big issue: there is absolutely NO guarantee that any
> of the classes from android.jar would run outside of an Android
> environment. They could rely on native libraries or special
> initializations only provided by the full Android environment. Even if
> a class runs now on top of Java SE, it could break in a future version
> as the implementation changes.
>
> Android is not Java, the target is Android devices, not JVMs.
>
> On Sat, Sep 27, 2008 at 1:27 AM, Shane Isbell <[EMAIL PROTECTED]>
> wrote:
> > I can't really say I agree that unit tests should only be run on the
> target
> > platform, although of course it does need to be tested on the platform. A
> > lot of unit tests are pretty darn useful for catching bugs outside of a
> > Dalvik environment. I often write Java code on one platform, say Windows,
> > and then test it out on Linux, perfectly natural.
> > Also, I like to run my debugger in my IDE but if I tie into in the
> > most trivial of Android classes, I can't do that anymore, a run-time
> > exception appears.
> >
> > Maybe since I'm not using Eclipse, the Android team's way of building
> > doesn't seem as necessary or productive to me.
> > Shane
> > On Sat, Sep 27, 2008 at 12:47 AM, Romain Guy <[EMAIL PROTECTED]>
> wrote:
> >>
> >> Everything should, and now must, run on the emulator or on a device.
> This
> >> is the only way to guarantee a program works (if only to run it on
> Dalvik
> >> rather than a stock JVM.) For what it's worth, that's how we run all of
> our
> >> tests in the Android team.
> >>
> >> We have special support for tests, especially instrumented tests in the
> >> framework. You can refer to the samples (apidemos) to see how they're
> set
> >> up.
> >>
> >> On Sep 27, 2008 12:30 AM, "Shane Isbell" <[EMAIL PROTECTED]>
> wrote:
> >>
> >>
> >>
> >> On Sat, Sep 27, 2008 at 12:24 AM, Romain Guy <[EMAIL PROTECTED]>
> wrote:
> >> > > How so? Aren't you ru...
> >>
> >> Some I do and some I don't. I've got the Masa plugins (for Maven builds)
> >> setup to do both. By simply hooking a value object like ContentValues
> into
> >> one of my classes, it now becomes untestable as a normal unit test, as I
> now
> >> get a runtime exception on ContentValues initialization.
> >>
> >
> >
> > >
> >
>
>
>
> --
> Romain Guy
> www.curious-creature.org
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to