Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diorite DB test case fails #23

Closed
jiri-janousek opened this issue Mar 20, 2018 · 6 comments
Closed

Diorite DB test case fails #23

jiri-janousek opened this issue Mar 20, 2018 · 6 comments
Labels
type: bug Something is not working as expected or the documentation is incorrect.

Comments

@jiri-janousek
Copy link
Member

jiri-janousek commented Mar 20, 2018

Reticketed from #19 (comment) (diorite-4_10_0-build3-f28.log)

/Drtdb/BindExpressionTest/test_parse_ok: 
db.BindExpressionTest.vala:63: str FAIL
	 'John' == '(null)' failed.
db.BindExpressionTest.vala:67: int: 18 == 0 FAIL
db.BindExpressionTest.vala:71: double: 65.5 == 0 FAIL
db.BindExpressionTest.vala:75: int64: 123456 == 0 FAIL
db.BindExpressionTest.vala:79: bool FAIL
TestCase.vala:830: Uncaught critical log message: GLib g_bytes_compare: assertion 'bytes2 != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: GLib g_byte_array_free_to_bytes: assertion 'array != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: GLib g_bytes_compare: assertion 'bytes2 != NULL' failed FAIL
[FAIL] 22 run, 14 passed, 8 failed FAIL
/Drtdb/ObjectQueryTest/test_get_cursor: 
db.ObjectQueryTest.vala:155: users.length: 1 == 0 FAIL
db.ObjectQueryTest.vala:157: id: 2 == 0 FAIL
db.ObjectQueryTest.vala:158: name FAIL
	 'Jean' == '(null)' failed.
db.ObjectQueryTest.vala:159: age: 50 == 0 FAIL
db.ObjectQueryTest.vala:160: height: 2.7200000000000002 == 0 FAIL
db.ObjectQueryTest.vala:162: blob FAIL
	 '070606040302010001020304060607' == '(null)' failed.
db.ObjectQueryTest.vala:166: not_in_db: 1024 == 0 FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_id: assertion 'self != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_name: assertion 'self != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_age: assertion 'self != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_height: assertion 'self != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_alive: assertion 'self != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_blob: assertion 'self != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_extra: assertion 'self != NULL' failed FAIL
TestCase.vala:830: Uncaught critical log message: DioriteTests drtdb_user_get_not_in_db: assertion 'self != NULL' failed FAIL
[FAIL] 36 run, 21 passed, 15 failed FAIL
/Drtdb/ObjectQueryTest/test_get_one: 
db.ObjectQueryTest.vala:271: Unexpected error: No data has been returned for object query. FAIL
[FAIL] 3 run, 2 passed, 1 failed FAIL
@jiri-janousek
Copy link
Member Author

Hello @martinkg, could you check https://github.com/tiliado/diorite/tree/vala0.40 ?

@jiri-janousek
Copy link
Member Author

If the test case still fails, could you attach the generated BindExpression.c file?

@martinkg
Copy link

run-dioritetests fails:
BindExpression.c.txt

@jiri-janousek
Copy link
Member Author

It seems that val.init(typeof(bool)).set_boolean(args.arg()); (and similar) in parse_va() are translated differently.

  • Vala 0.38:
GValue* _tmp35_;
GValue* _tmp36_;
gboolean _tmp37_;
_tmp35_ = val;
_tmp36_ = g_value_init (_tmp35_, G_TYPE_BOOLEAN);
_tmp37_ = va_arg (args, gboolean);
g_value_set_boolean (_tmp36_, _tmp37_);
  • Vala 0.40:
GValue* _tmp31_;
GValue _tmp32_;
_tmp31_ = val;
_tmp32_ = *g_value_init (_tmp31_, G_TYPE_BOOLEAN);
g_value_set_boolean (&_tmp32_, va_arg (args, gboolean));
  • Here, the actual value is assigned to a temporary variable _tmp32_, which is decoupled from original variable val.

jiri-janousek added a commit that referenced this issue Mar 23, 2018
It might work with Vala 0.40

Issue: #23

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
@jiri-janousek
Copy link
Member Author

Could you test the latest commit? It uses alternative GLib.Value initialization. https://github.com/tiliado/diorite/tree/vala0.40

@jiri-janousek jiri-janousek added the need info Assignee needs more information to work on this ticket. label Mar 23, 2018
@martinkg
Copy link

all tests are passed now.
Thanks

@jiri-janousek jiri-janousek removed the need info Assignee needs more information to work on this ticket. label Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is not working as expected or the documentation is incorrect.
Projects
None yet
Development

No branches or pull requests

2 participants