/vqdr/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/vqdr/trunk

« back to all changes in this revision

Viewing changes to tests/utils/gobject_to_string.vala

  • Committer: Gustav Hartvigsson
  • Date: 2021-11-15 12:16:03 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20211115121603-lclpo88js9sgreee
Refactoring.

* Moved all off the Common namespace into Utils.
* Moved the tests for the Utils into it's own fonder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
using GLib;
2
2
 
3
 
using VQDR.Common.Utils;
 
3
using Utils;
4
4
using VQDR.Expression;
5
5
 
 
6
 
6
7
class MyTestClass : GLib.Object {
7
8
   public int prop_int {get; set;}
8
9
   public string prop_string {get; set;}
28
29
 
29
30
void gobject_to_string_test () {
30
31
  
31
 
  Test.add_func ("/Common/Utils/gobject_to_string_int", () => {
 
32
  Test.add_func (UTIL_TEST_GOBJECT_PREFIX + "int", () => {
32
33
    var v1 = GLib.Object.new (typeof (MyTestClassInt),
33
34
                                     prop_int: 1337);
34
35
    string got_string = object_to_string (v1);
45
46
    }
46
47
  });
47
48
  
48
 
  Test.add_func ("/Common/Utils/gobject_to_string_string", () => {
 
49
  Test.add_func (UTIL_TEST_GOBJECT_PREFIX + "string", () => {
49
50
    var v1 = GLib.Object.new (typeof (MyTestClassString),
50
51
                                     prop_string: "string");
51
52
    
63
64
    }
64
65
  });
65
66
  
66
 
  Test.add_func ("/Common/Utils/gobject_to_string_bool", () => {
 
67
  Test.add_func (UTIL_TEST_GOBJECT_PREFIX + "bool", () => {
67
68
    var v1 = GLib.Object.new (typeof (MyTestClassBool),
68
69
                                     prop_bool: true);
69
70
    
81
82
    }
82
83
  });
83
84
  
84
 
  Test.add_func ("/Common/Utils/gobject_to_string_variant", () => {
 
85
  Test.add_func (UTIL_TEST_GOBJECT_PREFIX + "variant", () => {
85
86
    var my_var = new Variant ("(ssibb)", "aa", "bb", 10, false, true);
86
87
    var v1 = GLib.Object.new (typeof (MyTestClassVariant),
87
88
                                     prop_var: my_var);