Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

ERT-861 Fix bug when TRANX not available, added default value #731

Merged
merged 5 commits into from
Mar 29, 2015

Conversation

iLoop2
Copy link
Contributor

@iLoop2 iLoop2 commented Mar 20, 2015

No description provided.

@joakim-hove
Copy link
Contributor

Looks good - but should include a brief test just loading the offending dataset (mentioned in task description) - that task will currently bring the code to a complete failure.

@joakim-hove
Copy link
Contributor

(mentioned in task description)

Now it is ...

@joakim-hove
Copy link
Contributor

In the current test the main export function - ecl_nnc_export() is never called for the problematic TYRIHANS case. I suggest adding one new test function:

void test_nnc_export_missing_TRANX(const char * base ) {
    ecl_grid_type * grid = ...
    ecl_file_type * init_file = ...
    int export_size = ecl_nnc_export_get_size( grid );
    ecl_nnc_type * data = util_malloc( export_size * sizeof * data );

   test_assert_int_equal( ecl_nnc_export( grid , init_file , data ) , 0);
   free( data );
   ecl_file_close( init_file );
   ecl_grid_free( grid );
}

...

int main(int argc, char ** argv) {
    ...
    if (is_nnc_tran_null)
       test_nnc_export_missing_TRANX( base );
}

@joakim-hove
Copy link
Contributor

When a test actually calling ecl_nnc_export() succesfully with the problematic data set has been implemented, this can be merged.

joakim-hove added a commit that referenced this pull request Mar 29, 2015
ERT-861 Fix bug when TRANX not available, added default value
@joakim-hove joakim-hove merged commit d113ca6 into Ensembles:master Mar 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants