The R Project SVN R

Rev

Rev 54719 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 54719 Rev 71390
Line 132... Line 132...
132
stopifnot(identical(checkAssign(quote(f(g("x")) <- 1), cntxt), FALSE))
132
stopifnot(identical(checkAssign(quote(f(g("x")) <- 1), cntxt), FALSE))
133
 
133
 
134
 
134
 
135
## flattenPlace
135
## flattenPlace
136
flattenPlace <- compiler:::flattenPlace
136
flattenPlace <- compiler:::flattenPlace
137
stopifnot(identical(flattenPlace(quote(f(g(h(x, k), j), i))),
137
stopifnot(identical(flattenPlace(quote(f(g(h(x, k), j), i)))$places,
138
                    list(quote(f(`*tmp*`, i)),
138
                    list(quote(f(`*tmp*`, i)),
139
                         quote(g(`*tmp*`, j)),
139
                         quote(g(`*tmp*`, j)),
140
                         quote(h(`*tmp*`, k)))))
140
                         quote(h(`*tmp*`, k)))))
-
 
141
stopifnot(identical(flattenPlace(quote(f(g(h(x, k), j), i)))$origplaces,
-
 
142
                    list(quote(f(g(h(x, k), j), i)),
-
 
143
                         quote(g(h(x, k), j)),
-
 
144
                         quote(h(x, k)))))
141
 
145
 
142
## getAssignFun
146
## getAssignFun
143
getAssignFun <- compiler:::getAssignFun
147
getAssignFun <- compiler:::getAssignFun
144
stopifnot(identical(getAssignFun(quote(f)), quote(`f<-`)))
148
stopifnot(identical(getAssignFun(quote(f)), quote(`f<-`)))
145
stopifnot(identical(getAssignFun("f"), NULL))
149
stopifnot(identical(getAssignFun("f"), NULL))