Re: svn commit: r1706077 - /tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1706077 - /tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java

Tyler Palsulich
Hi Chris,

It looks like these two lines are equivalent (assert not null versus assert
true not null). Right?

Tyler

On Wed, Sep 30, 2015, 9:45 AM  <[hidden email]> wrote:

> Author: mattmann
> Date: Wed Sep 30 16:45:32 2015
> New Revision: 1706077
>
> URL: http://svn.apache.org/viewvc?rev=1706077&view=rev
> Log:
> - Files isn't always present (just found test case on older version of
> GDAL)
>
> Modified:
>
> tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java
>
> Modified:
> tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java
> URL:
> http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java?rev=1706077&r1=1706076&r2=1706077&view=diff
>
> ==============================================================================
> ---
> tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java
> (original)
> +++
> tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java
> Wed Sep 30 16:45:32 2015
> @@ -69,7 +69,7 @@ public class TestGDALParser extends Tika
>              assertNotNull(met);
>              assertNotNull(met.get("Driver"));
>              assertEquals(expectedDriver, met.get("Driver"));
> -            assertNotNull(met.get("Files"));
> +            assumeTrue(met.get("Files") != null);
>              assertNotNull(met.get("Coordinate System"));
>              assertEquals(expectedCoordinateSystem, met.get("Coordinate
> System"));
>              assertNotNull(met.get("Size"));
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1706077 - /tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java

Mattmann, Chris A (3010)
Hey Tyler,

assertNotNull returns void whereas I needed something testable for
assumeTrue (since apparently gdal doesn’t always print out the
Files output on all systems and versions which I found out yesterday).

Make sense?

Cheers,
Chris

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: [hidden email]
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





-----Original Message-----
From: Tyler Palsulich <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Thursday, October 1, 2015 at 6:39 AM
To: "[hidden email]" <[hidden email]>, "[hidden email]"
<[hidden email]>
Subject: Re: svn commit: r1706077 -
/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDAL
Parser.java

>Hi Chris,
>
>It looks like these two lines are equivalent (assert not null versus
>assert
>true not null). Right?
>
>Tyler
>
>On Wed, Sep 30, 2015, 9:45 AM  <[hidden email]> wrote:
>
>> Author: mattmann
>> Date: Wed Sep 30 16:45:32 2015
>> New Revision: 1706077
>>
>> URL: http://svn.apache.org/viewvc?rev=1706077&view=rev
>> Log:
>> - Files isn't always present (just found test case on older version of
>> GDAL)
>>
>> Modified:
>>
>>
>>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
>>LParser.java
>>
>> Modified:
>>
>>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
>>LParser.java
>> URL:
>>
>>http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/test/java/org/ap
>>ache/tika/parser/gdal/TestGDALParser.java?rev=1706077&r1=1706076&r2=17060
>>77&view=diff
>>
>>
>>=========================================================================
>>=====
>> ---
>>
>>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
>>LParser.java
>> (original)
>> +++
>>
>>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
>>LParser.java
>> Wed Sep 30 16:45:32 2015
>> @@ -69,7 +69,7 @@ public class TestGDALParser extends Tika
>>              assertNotNull(met);
>>              assertNotNull(met.get("Driver"));
>>              assertEquals(expectedDriver, met.get("Driver"));
>> -            assertNotNull(met.get("Files"));
>> +            assumeTrue(met.get("Files") != null);
>>              assertNotNull(met.get("Coordinate System"));
>>              assertEquals(expectedCoordinateSystem, met.get("Coordinate
>> System"));
>>              assertNotNull(met.get("Size"));
>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1706077 - /tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDALParser.java

Tyler Palsulich
Hi Chris,

Ah, got it. I misread assume as assert. Doh!

Tyler

On Thu, Oct 1, 2015, 6:45 AM Mattmann, Chris A (3980) <
[hidden email]> wrote:

> Hey Tyler,
>
> assertNotNull returns void whereas I needed something testable for
> assumeTrue (since apparently gdal doesn’t always print out the
> Files output on all systems and versions which I found out yesterday).
>
> Make sense?
>
> Cheers,
> Chris
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Chris Mattmann, Ph.D.
> Chief Architect
> Instrument Software and Science Data Systems Section (398)
> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
> Office: 168-519, Mailstop: 168-527
> Email: [hidden email]
> WWW:  http://sunset.usc.edu/~mattmann/
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Adjunct Associate Professor, Computer Science Department
> University of Southern California, Los Angeles, CA 90089 USA
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
>
> -----Original Message-----
> From: Tyler Palsulich <[hidden email]>
> Reply-To: "[hidden email]" <[hidden email]>
> Date: Thursday, October 1, 2015 at 6:39 AM
> To: "[hidden email]" <[hidden email]>, "[hidden email]"
> <[hidden email]>
> Subject: Re: svn commit: r1706077 -
> /tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDAL
> Parser.java
>
> >Hi Chris,
> >
> >It looks like these two lines are equivalent (assert not null versus
> >assert
> >true not null). Right?
> >
> >Tyler
> >
> >On Wed, Sep 30, 2015, 9:45 AM  <[hidden email]> wrote:
> >
> >> Author: mattmann
> >> Date: Wed Sep 30 16:45:32 2015
> >> New Revision: 1706077
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1706077&view=rev
> >> Log:
> >> - Files isn't always present (just found test case on older version of
> >> GDAL)
> >>
> >> Modified:
> >>
> >>
> >>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
> >>LParser.java
> >>
> >> Modified:
> >>
> >>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
> >>LParser.java
> >> URL:
> >>
> >>
> http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/test/java/org/ap
> >>ache/tika/parser/gdal/TestGDALParser.java?rev=1706077&r1=1706076&r2=17060
> >>77&view=diff
> >>
> >>
> >>=========================================================================
> >>=====
> >> ---
> >>
> >>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
> >>LParser.java
> >> (original)
> >> +++
> >>
> >>tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/gdal/TestGDA
> >>LParser.java
> >> Wed Sep 30 16:45:32 2015
> >> @@ -69,7 +69,7 @@ public class TestGDALParser extends Tika
> >>              assertNotNull(met);
> >>              assertNotNull(met.get("Driver"));
> >>              assertEquals(expectedDriver, met.get("Driver"));
> >> -            assertNotNull(met.get("Files"));
> >> +            assumeTrue(met.get("Files") != null);
> >>              assertNotNull(met.get("Coordinate System"));
> >>              assertEquals(expectedCoordinateSystem, met.get("Coordinate
> >> System"));
> >>              assertNotNull(met.get("Size"));
> >>
> >>
> >>
>
>