Mercurial > hg > octave-nkf
changeset 2725:878e5fd30580
[project @ 1997-02-23 06:10:49 by jwe]
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-1.m @@ -0,0 +1,1 @@ +is_struct (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-10.m @@ -0,0 +1,1 @@ +is_struct ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-11.m @@ -0,0 +1,2 @@ +s.a = 1; +is_struct (s, 1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-2.m @@ -0,0 +1,1 @@ +is_struct ([1, 2])
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-3.m @@ -0,0 +1,1 @@ +is_struct ([])
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-4.m @@ -0,0 +1,1 @@ +is_struct ([1, 2; 3, 4])
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-5.m @@ -0,0 +1,1 @@ +is_struct ("t")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-6.m @@ -0,0 +1,1 @@ +is_struct ("test")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-7.m @@ -0,0 +1,1 @@ +is_struct (["test"; "ing"])
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-8.m @@ -0,0 +1,2 @@ +s.a = 1; +is_struct (s)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/is_struct-9.m @@ -0,0 +1,2 @@ +s.a.b = 1; +is_struct (s.a)
--- a/test/octave.test/struct/struct.exp +++ b/test/octave.test/struct/struct.exp @@ -0,0 +1,87 @@ +set test is_struct-1 +set prog_output "ans = 0" +do_test is_struct-1.m + +set test is_struct-2 +set prog_output "ans = 0" +do_test is_struct-2.m + +set test is_struct-3 +set prog_output "ans = 0" +do_test is_struct-3.m + +set test is_struct-4 +set prog_output "ans = 0" +do_test is_struct-4.m + +set test is_struct-5 +set prog_output "ans = 0" +do_test is_struct-5.m + +set test is_struct-6 +set prog_output "ans = 0" +do_test is_struct-6.m + +set test is_struct-7 +set prog_output "ans = 0" +do_test is_struct-7.m + +set test is_struct-8 +set prog_output "ans = 1" +do_test is_struct-8.m + +set test is_struct-9 +set prog_output "ans = 1" +do_test is_struct-9.m + +set test is_struct-10 +set prog_output "\n... is_struct:.*" +do_test is_struct-10.m + +set test is_struct-11 +set prog_output "\n... is_struct:.*" +do_test is_struct-11.m + +set test struct_contains-1 +set prog_output "ans = 1" +do_test struct_contains-1.m + +set test struct_contains-2 +set prog_output "ans = 0" +do_test struct_contains-2.m + +set test struct_contains-3 +set prog_output "\n... struct_contains:.*" +do_test struct_contains-3.m + +set test struct_contains-4 +set prog_output "\n... struct_contains:.*" +do_test struct_contains-4.m + +set test struct_contains-5 +set prog_output "\n... struct_contains:.*" +do_test struct_contains-5.m + +set test struct_contains-6 +set prog_output "\n... struct_contains:.*" +do_test struct_contains-6.m + +set test struct_elements-1 +set prog_output "ans = 1" +do_test struct_elements-1.m + +set test struct_elements-2 +set prog_output "ans = 1" +do_test struct_elements-2.m + +set test struct_elements-3 +set prog_output "\n... struct_elements:.*" +do_test struct_elements-3.m + +set test struct_elements-4 +set prog_output "\n... struct_elements:.*" +do_test struct_elements-4.m + +set test struct_elements-5 +set prog_output "error:.*" +do_test struct_elements-5.m
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_contains-1.m @@ -0,0 +1,3 @@ +s.aaa = 1; +s.a = 2; +struct_contains (s, "a")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_contains-2.m @@ -0,0 +1,3 @@ +s.aaa = 1; +s.a = 2; +struct_contains (s, "b")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_contains-3.m @@ -0,0 +1,1 @@ +struct_contains ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_contains-4.m @@ -0,0 +1,3 @@ +s.aaa = 1; +s.a = 2; +struct_contains (s, "a", 3)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_contains-5.m @@ -0,0 +1,1 @@ +struct_contains (1, "m")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_contains-6.m @@ -0,0 +1,2 @@ +s.a = 2; +struct_contains (s, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_elements-1.m @@ -0,0 +1,2 @@ +s.a = 1; +strcmp (struct_elements (s), "a")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_elements-2.m @@ -0,0 +1,2 @@ +s.a.b = 1; +strcmp (struct_elements (s.a), "b")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/struct_elements-3.m @@ -0,0 +1,1 @@ +struct_elements ()