Пример #1
0
void test_create_from_summary(ecl_grid_type * grid) {
  container_config_type * container_config = container_config_alloc( "Container");
  block_obs_type * block_obs = block_obs_alloc( "ObsKey" , container_config , grid );
  
  test_assert_true( block_obs_is_instance( block_obs ));
  test_assert_int_equal(0 , block_obs_get_size( block_obs ));

  
  block_obs_append_summary_obs( block_obs , 10 , 12 , 8  , "BPR:111,13,9" , 100 , 25);
  test_assert_int_equal(1 , block_obs_get_size( block_obs ));
  block_obs_append_summary_obs( block_obs , 10 , 12 , 9  , "BPR:11,13,10" , 100 , 25);
  test_assert_int_equal(2 , block_obs_get_size( block_obs ));
  block_obs_free( block_obs );

  container_config_free( container_config );
}
Пример #2
0
enkf_config_node_type * enkf_config_node_new_container( const char * key ) {
  enkf_config_node_type * config_node = enkf_config_node_alloc__( INVALID , CONTAINER , key );
  config_node->data = container_config_alloc( key );
  return config_node;
}