eolian: remove global vars from tests

This commit is contained in:
Daniel Kolesa 2019-09-24 16:17:11 +02:00
parent 4ce7444dd1
commit 251d8fc6bd
8 changed files with 7 additions and 63 deletions

View File

@ -2,12 +2,6 @@
const Foo: int = 5; [[doc for constant]]
var Bar: float = 10.3f; [[doc for global]]
var Baz: long; [[in header but not in source]]
var @extern Bah: double; // not generated
class Class_Simple {
[[Class Desc Simple]]
c_prefix: efl_canvas_object_simple;

View File

@ -1,4 +1,3 @@
EWAPI float BAR = 10.300000f;
Eina_Bool _class_simple_a_set(Eo *obj, Evas_Simple_Data *pd, int value);

View File

@ -19,18 +19,6 @@ typedef Eo Class_Simple;
#define FOO 5
#endif
/** doc for global
*
* @ingroup Bar
*/
EWAPI extern float BAR;
/** in header but not in source
*
* @ingroup Baz
*/
EWAPI extern long BAZ;
#endif
/** Class Desc Simple

View File

@ -56,11 +56,13 @@ typedef enum
*/
typedef Bar Alias;
#ifndef PANTS
/** Docs for var.
*
* @ingroup pants
*/
EWAPI extern int PANTS;
#define PANTS 150
#endif
/** Opaque struct docs. See @ref Foo for another struct.
*
@ -74,7 +76,7 @@ typedef struct _Opaque Opaque;
* @brief Docs for class.
*
* More docs for class. Testing references now. @ref Foo @ref Bar @ref Alias
* @ref pants @ref eo_docs_meth @ref eo_docs_prop_get @ref eo_docs_prop_get
* @ref PANTS @ref eo_docs_meth @ref eo_docs_prop_get @ref eo_docs_prop_get
* @ref eo_docs_prop_set @ref Foo.field1 @ref BAR_FOO @ref Eo_Docs
*
* @since 1.18

View File

@ -31,7 +31,7 @@ type Alias: Bar; [[Docs for typedef.
See @Bar. @since 2.0
]]
var pants: int = 150; [[Docs for var.]]
const pants: int = 150; [[Docs for var.]]
struct Opaque; [[Opaque struct docs. See @Foo for another struct.]]

View File

@ -1,15 +1,6 @@
// regular constant
const Foo: int = 5;
// regular global
var Bar: float = 10.3f;
// no-value global
var Baz: long;
// extern global
var @extern Bah: double;
class Var {
methods {
foo {

View File

@ -795,36 +795,6 @@ EFL_START_TEST(eolian_var)
fail_if(v.type != EOLIAN_EXPR_INT);
fail_if(v.value.i != 5);
/* regular global */
fail_if(!(var = eolian_unit_global_by_name_get(unit, "Bar")));
fail_if(eolian_variable_type_get(var) != EOLIAN_VAR_GLOBAL);
fail_if(eolian_variable_is_extern(var));
fail_if(!(type = eolian_variable_base_type_get(var)));
fail_if(!(name = eolian_type_short_name_get(type)));
fail_if(strcmp(name, "float"));
fail_if(!(exp = eolian_variable_value_get(var)));
v = eolian_expression_eval(exp, EOLIAN_MASK_ALL);
fail_if(v.type != EOLIAN_EXPR_FLOAT);
fail_if(((int)v.value.f) != 10);
/* no-value global */
fail_if(!(var = eolian_unit_global_by_name_get(unit, "Baz")));
fail_if(eolian_variable_type_get(var) != EOLIAN_VAR_GLOBAL);
fail_if(eolian_variable_is_extern(var));
fail_if(!(type = eolian_variable_base_type_get(var)));
fail_if(!(name = eolian_type_short_name_get(type)));
fail_if(strcmp(name, "long"));
fail_if(eolian_variable_value_get(var));
/* extern global */
fail_if(!(var = eolian_unit_global_by_name_get(unit, "Bah")));
fail_if(eolian_variable_type_get(var) != EOLIAN_VAR_GLOBAL);
fail_if(!eolian_variable_is_extern(var));
fail_if(!(type = eolian_variable_base_type_get(var)));
fail_if(!(name = eolian_type_short_name_get(type)));
fail_if(strcmp(name, "double"));
fail_if(eolian_variable_value_get(var));
eolian_state_free(eos);
}
EFL_END_TEST
@ -1210,7 +1180,7 @@ EFL_START_TEST(eolian_docs)
fail_if(strcmp(eolian_documentation_since_get(doc),
"2.0"));
fail_if(!(var = eolian_unit_global_by_name_get(unit, "pants")));
fail_if(!(var = eolian_unit_constant_by_name_get(unit, "pants")));
fail_if(!(doc = eolian_variable_documentation_get(var)));
fail_if(strcmp(eolian_documentation_summary_get(doc),
"Docs for var."));

View File

@ -31,7 +31,7 @@ type Alias: Bar; [[Docs for typedef.
See @Bar. @since 2.0
]]
var pants: int = 150; [[Docs for var.]]
const pants: int = 150; [[Docs for var.]]
struct Opaque; [[Opaque struct docs. See @Foo for another struct.]]