AlloSphere-Research-Group / AlloSystem

AlloSystem is a cross-platform suite of C++ components for building interactive multimedia tools and applications.
http://mat.ucsb.edu/allosphere/software.php
BSD 3-Clause "New" or "Revised" License
65 stars 22 forks source link

IOWindow test in allocore failing #51

Closed mantaraya36 closed 9 years ago

mantaraya36 commented 9 years ago

The IOWindow test from the Allocore test suite is failing for me with:

allocoreTests: /home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/unitTests/utIOWindowGL.cpp:38: virtual bool MyWindow::onResize(int, int): Assertion `onCreateCalls' failed.

The test code looks like:


    bool onResize(int dw, int dh){
        assert(onCreateCalls);  // at least one onCreate called
        if(onCreateCalls == 1){
            assert(dw == dimensions().w);
            assert(dh == dimensions().h);
        }
        ++onResizeCalls;
        return true;
    }
mantaraya36 commented 9 years ago

Removing the line:

assert(onCreateCalls);  // at least one onCreate called

Fixes the issue, but it seems that the fix should be deeper and more complex.

LancePutnam commented 9 years ago

Seems like the onCreate call got accidentally moved to after onResize when I refactored Window. I just fixed this (https://github.com/AlloSphere-Research-Group/AlloSystem/commit/40ae94de0dbcbdd2c0ebe4ad037b7d475dff083c) so hopefully the test passes now.

mantaraya36 commented 9 years ago

Fixed for me. Travis build is still failing allocoreTest, but this issue is resolved.