pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2009-02-21
2009-02-21 12:55:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>
dfaacc78d61bc14c2b94fbfdd6fa08cd820bf29f (
18
lines) (+
16
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Some tests of function_name() on named lambdas.
Rev: src/testsuite.in:1.865
1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
864
2009/02/
12
21:
06
:
27
srb
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
865
2009/02/
21
12:
55
:
26
grubba
Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]])
4643:
test_any([[ class Foo { };
-
return
function_name(object_program(Foo()));
+
return function_name(object_program(Foo()));
]], "Foo") test_any([[
4652:
]],1) test_any([[
+
// Named lambda.
+
int foo(){};
+
return function_name(foo);
+
]], "foo")
+
+
test_any([[
+
// Named trampoline.
int q;
-
+
int foo() { return q; };
+
return function_name(foo);
+
]], "foo")
+
+
test_any([[
+
int q;
return function_object( lambda() { return q; }); ]],[[this_object()]])