annotate test/cedet/tests/testfriends.cpp @ 112453:06719a229a46 default tip

* calc/calc.el (calc-default-power-reference-level) (calc-default-field-reference-level): New variables. * calc/calc-units.el (math-standard-units): Add dB and Np. (math-logunits): New variable. (math-extract-logunits, math-logcombine, calcFunc-luplus) (calcFunc-luminus, calc-luplus, calc-luminus, math-logunit-level) (calcFunc-fieldlevel, calcFunc-powerlevel, calc-level): New functions. (math-find-base-units-rec): Add entry for ln(10). * calc/calc-help.el (calc-u-prefix-help): Add logarithmic help. (calc-ul-prefix-help): New function. * calc/calc-ext.el (calc-init-extensions): Autoload new units functions. Add keybindings for new units functions.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 23 Jan 2011 23:08:04 -0600
parents ef719132ddfa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104494
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
1 // Test parsing of friends and how they are used in completion.
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
2 /*
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
3 >> Thanks Damien Profeta for the nice example.
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
4 >
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
5 > I paste a small example.
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
6 > It would be great if friend can be well parsed and even greater if
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
7 > class B can access to all the members of A.
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
8 */
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
9
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
10 class Af // %2% ( ( "testfriends.cpp" ) ( "Af" "B::testB" ) )
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
11 {
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
12 public:
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
13 int pubVar;
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
14 private:
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
15 int privateVar;
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
16
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
17 friend class B;
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
18
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
19 };
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
20
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
21 class B
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
22 {
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
23 public:
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
24 int testB();
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
25 int testAB();
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
26
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
27 };
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
28
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
29
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
30 int B::testB() {
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
31 Af classA;
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
32 classA.//-1-
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
33 ; //#1# ( "privateVar" "pubVar" )
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
34 }
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
35
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
36 int B::testAB() { // %1% ( ( "testfriends.cpp" ) ( "B" "B::testAB" ) )
e480034314ce Add Semantic unit tests.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
37 }
105377
7f4c7f5c0eba Add arch tagline
Miles Bader <miles@gnu.org>
parents: 104494
diff changeset
38