1 set test "sid configuration"
2 sid_config_component_etc_test_with_tracing "stdio1.conf" \
3 "load [sid_find_file libconsoles.la] console_component_library" \
5 "connect-pin main perform-activity -> wrapper poll"
9 if {[sid_start "stdio1.conf"]} { pass $test } else { fail $test ; return }
11 set test "find pin that does not exist"
12 set pin [sid_cmd "sid::component::find_pin $victim pin"]
13 if {$pin == ""} then { pass $test } else { fail $test }
15 set test "connect to a pin that does not exist"
16 set pin [sid_cmd "sid::pin::new"]
17 set status [sid_cmd "sid::component::connect_pin $victim input $pin"]
18 if {$status == "not_found"} then { pass $test } else { fail $test }
20 set test "check connected pins on a pin that does not exist"
21 set pin [sid_cmd "sid::component::connected_pins $victim input2"]
22 if {$pin == ""} then { pass $test } else { fail $test }
24 set test "check disconnecting pin on a pin that does not exist"
25 set pin [sid_cmd "sid::pin::new"]
26 set status [sid_cmd "sid::component::disconnect_pin $victim input $pin"]
27 if {$status == "not_found"} then { pass $test } else { fail $test }
29 set test "find bus that does not exist"
30 set pin [sid_cmd "sid::component::find_bus $victim bus"]
31 if {$pin == ""} then { pass $test } else { fail $test }
33 set test "connect to an accessor that does not exist"
34 set bus [sid_cmd "sid::bus::new"]
35 set status [sid_cmd "sid::component::connect_accessor $victim bus1 $bus"]
36 if {$status == "not_found"} then { pass $test } else { fail $test }
38 set test "check connected bus on a bus that does not exist"
39 set bus2 [sid_cmd "sid::component::connected_bus $victim bus2"]
40 if {$bus2 == ""} then { pass $test } else { fail $test }
42 set test "set relationships that does not exist"
43 set status [sid_cmd "sid::component::relate $victim any $victim"]
44 if {$status == "not_found"} then { pass $test } else { fail $test }
46 set test "set relationships to relate to a non existing component"
47 set status [sid_cmd "sid::component::relate $victim relationship $victim"]
48 if {$status == "not_found"} then { pass $test } else { fail $test }
50 set test "query relationships that does not exist"
51 set comps [sid_cmd "sid::component::related_components $victim rel"]
52 if {$comps == ""} then { pass $test } else { fail $test }
54 set test "set non existing attribute to -1"
55 set status [sid_cmd "sid::component::set_attribute_value $victim new -1" ]
56 if {$status == "not_found"} then { pass $test } else { fail $test }
59 if [sid_stop] then { pass $test } else { fail $test ; return }
62 # zap temp file if tests were successful
64 if {$exit_status == "0"} then { file delete "stdio1.conf" }