Beispiel #1
0
        public void create_nested_array()
        {
            var @input = $@"
                %a = [1,asarray(1,2,3)]
                ";

            var variables = Variables(input).Values.Last();

            variables.Should().BeOfType <Array>().Which[1].Should().BeEquivalentTo(Array.CreateParams(1, 2, 3));
        }
Beispiel #2
0
        public void declaration_new_nested_array()
        {
            var @input = $@"
                %a = [1,asarray(1,2,3)]
                ";
            var vars   = Variables(input);

            vars.Values.Last().Should().BeOfType <ReferenceData>().Which.UnpackReference(vars)
            .Should().BeOfType <Array>().Which[1].Should().BeEquivalentTo(Array.CreateParams(1, 2, 3));
        }
Beispiel #3
0
 public void array_create_ints()
 {
     Array.CreateParams(1, 2, 3)
     .Should()
     .ContainInOrder(Scalar.Create(1), Scalar.Create(2), Scalar.Create(3));
 }
Beispiel #4
0
 public void array_createparams_singlenull()
 {
     Array.CreateParams(null)
     .Should()
     .ContainInOrder(Scalar.Create(null));
 }
Beispiel #5
0
 public void array_create_nulls()
 {
     Array.CreateParams(null, null, null)
     .Should()
     .ContainInOrder(Scalar.Create(null), Scalar.Create(null), Scalar.Create(null));
 }
Beispiel #6
0
 public static Array asarray(params object[] objs)
 {
     return(Array.CreateParams(objs));
 }