~ubuntu-branches/ubuntu/saucy/openexr/saucy

« back to all changes in this revision

Viewing changes to IlmImfTest/testMagic.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adeodato Simó
  • Date: 2008-03-24 23:00:21 UTC
  • mfrom: (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080324230021-gnofz9mnvcj1xlv3
Tags: 1.6.1-3
Disable (hopefully temporarily) the test suite on arm and ia64.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
///////////////////////////////////////////////////////////////////////////
 
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas
4
4
// Digital Ltd. LLC
40
40
#include <stdio.h>
41
41
#include <assert.h>
42
42
 
 
43
#ifndef ILM_IMF_TEST_IMAGEDIR
 
44
    #define ILM_IMF_TEST_IMAGEDIR
 
45
#endif
 
46
 
 
47
 
43
48
using namespace Imf;
44
49
using namespace std;
45
50
 
50
55
{
51
56
    cout << fileName << " " << flush;
52
57
 
53
 
#ifdef HAVE_STL_IOS_BASE
54
58
    ifstream f (fileName, ios_base::binary);
55
 
#else
56
 
    ifstream f (fileName, ios::binary|ios::in);
57
 
#endif
 
59
    assert (!!f);
58
60
 
59
61
    char bytes[4];
60
62
    f.read (bytes, sizeof (bytes));
119
121
    {
120
122
        cout << "Testing magic number" << endl;
121
123
 
122
 
        testFile1 ("comp_none.exr", true);
123
 
        testFile1 ("invalid.exr", false);
 
124
        testFile1 (ILM_IMF_TEST_IMAGEDIR "comp_none.exr", true);
 
125
        testFile1 (ILM_IMF_TEST_IMAGEDIR "invalid.exr", false);
124
126
 
125
 
        testFile2 ("tiled.exr", true, true, true);
126
 
        testFile2 ("comp_none.exr", true, true, false);
127
 
        testFile2 ("invalid.exr", true, false, false);
128
 
        testFile2 ("does_not_exist.exr", false, false, false);
 
127
        testFile2 (ILM_IMF_TEST_IMAGEDIR "tiled.exr", true, true, true);
 
128
        testFile2 (ILM_IMF_TEST_IMAGEDIR "comp_none.exr", true, true, false);
 
129
        testFile2 (ILM_IMF_TEST_IMAGEDIR "invalid.exr", true, false, false);
 
130
        testFile2 (ILM_IMF_TEST_IMAGEDIR "does_not_exist.exr", false, false, false);
129
131
 
130
132
        cout << "ok\n" << endl;
131
133
    }