@@ -1511,6 +1511,14 @@ func TestDebuggerScopeVariables(t *testing.T) {
1511
1511
name : "Locals" ,
1512
1512
namedVariables : 0 ,
1513
1513
},
1514
+ "Input (not provided)" : {
1515
+ name : "Input (not provided)" ,
1516
+ namedVariables : 0 ,
1517
+ },
1518
+ "Data (not provided)" : {
1519
+ name : "Data (not provided)" ,
1520
+ namedVariables : 0 ,
1521
+ },
1514
1522
},
1515
1523
},
1516
1524
{
@@ -1543,6 +1551,10 @@ func TestDebuggerScopeVariables(t *testing.T) {
1543
1551
},
1544
1552
},
1545
1553
},
1554
+ "Data (not provided)" : {
1555
+ name : "Data (not provided)" ,
1556
+ namedVariables : 0 ,
1557
+ },
1546
1558
},
1547
1559
},
1548
1560
{
@@ -1580,6 +1592,10 @@ func TestDebuggerScopeVariables(t *testing.T) {
1580
1592
},
1581
1593
},
1582
1594
},
1595
+ "Data (not provided)" : {
1596
+ name : "Data (not provided)" ,
1597
+ namedVariables : 0 ,
1598
+ },
1583
1599
},
1584
1600
},
1585
1601
{
@@ -1644,6 +1660,14 @@ func TestDebuggerScopeVariables(t *testing.T) {
1644
1660
},
1645
1661
},
1646
1662
},
1663
+ "Input (not provided)" : {
1664
+ name : "Input (not provided)" ,
1665
+ namedVariables : 0 ,
1666
+ },
1667
+ "Data (not provided)" : {
1668
+ name : "Data (not provided)" ,
1669
+ namedVariables : 0 ,
1670
+ },
1647
1671
},
1648
1672
},
1649
1673
{
@@ -1662,6 +1686,14 @@ func TestDebuggerScopeVariables(t *testing.T) {
1662
1686
},
1663
1687
},
1664
1688
},
1689
+ "Input (not provided)" : {
1690
+ name : "Input (not provided)" ,
1691
+ namedVariables : 0 ,
1692
+ },
1693
+ "Data (not provided)" : {
1694
+ name : "Data (not provided)" ,
1695
+ namedVariables : 0 ,
1696
+ },
1665
1697
},
1666
1698
},
1667
1699
{
@@ -1684,6 +1716,14 @@ func TestDebuggerScopeVariables(t *testing.T) {
1684
1716
name : "Locals" ,
1685
1717
namedVariables : 0 ,
1686
1718
},
1719
+ "Input (not provided)" : {
1720
+ name : "Input (not provided)" ,
1721
+ namedVariables : 0 ,
1722
+ },
1723
+ "Data (not provided)" : {
1724
+ name : "Data (not provided)" ,
1725
+ namedVariables : 0 ,
1726
+ },
1687
1727
"Result Set" : {
1688
1728
name : "Result Set" ,
1689
1729
namedVariables : 1 ,
@@ -1739,6 +1779,14 @@ func TestDebuggerScopeVariables(t *testing.T) {
1739
1779
name : "Locals" ,
1740
1780
namedVariables : 0 ,
1741
1781
},
1782
+ "Input (not provided)" : {
1783
+ name : "Input (not provided)" ,
1784
+ namedVariables : 0 ,
1785
+ },
1786
+ "Data (not provided)" : {
1787
+ name : "Data (not provided)" ,
1788
+ namedVariables : 0 ,
1789
+ },
1742
1790
"Virtual Cache" : {
1743
1791
name : "Virtual Cache" ,
1744
1792
namedVariables : 2 ,
@@ -1766,6 +1814,10 @@ func TestDebuggerScopeVariables(t *testing.T) {
1766
1814
name : "Locals" ,
1767
1815
namedVariables : 0 ,
1768
1816
},
1817
+ "Input (not provided)" : {
1818
+ name : "Input (not provided)" ,
1819
+ namedVariables : 0 ,
1820
+ },
1769
1821
"Data" : {
1770
1822
name : "Data" ,
1771
1823
namedVariables : 1 ,
@@ -1859,23 +1911,27 @@ func TestDebuggerScopeVariables(t *testing.T) {
1859
1911
if scope .Name () != expScope .name {
1860
1912
t .Errorf ("Expected scope name %s, got %s" , expScope .name , scope .Name ())
1861
1913
}
1914
+
1862
1915
if scope .NamedVariables () != expScope .namedVariables {
1863
1916
t .Errorf ("Expected %d named variables, got %d" , expScope .namedVariables , scope .NamedVariables ())
1864
1917
}
1865
- if scope .VariablesReference () == 0 {
1918
+
1919
+ if scope .NamedVariables () > 0 && scope .VariablesReference () == 0 {
1866
1920
t .Errorf ("Expected non-zero variables reference" )
1867
1921
}
1868
1922
1869
- vars , err := s .Variables (scope .VariablesReference ())
1870
- if err != nil {
1871
- t .Fatalf ("Unexpected error: %v" , err )
1872
- }
1923
+ if expScope .namedVariables > 0 {
1924
+ vars , err := s .Variables (scope .VariablesReference ())
1925
+ if err != nil {
1926
+ t .Fatalf ("Unexpected error: %v" , err )
1927
+ }
1873
1928
1874
- if len (vars ) != expScope .namedVariables {
1875
- t .Fatalf ("Expected nuber of variables to equal named variables for scope (%d), got %d" , expScope .namedVariables , len (vars ))
1876
- }
1929
+ if len (vars ) != expScope .namedVariables {
1930
+ t .Fatalf ("Expected nuber of variables to equal named variables for scope (%d), got %d" , expScope .namedVariables , len (vars ))
1931
+ }
1877
1932
1878
- assertVariables (t , s , vars , expScope .variables )
1933
+ assertVariables (t , s , vars , expScope .variables )
1934
+ }
1879
1935
}
1880
1936
})
1881
1937
}
0 commit comments