File: test015

package info (click to toggle)
pmccabe 2.8-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 876 kB
  • sloc: ansic: 3,084; cpp: 1,080; sh: 401; makefile: 42
file content (40 lines) | stat: -rw-r--r-- 860 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
namespace Spreadsheetns {
    ACosFormula::ACosFormula() {
	//empty
    }

    ACosFormula::ACosFormula(IFormula* formula) : IOneArgFormula(formula) {
	if((formula->getResult() < -1) || (formula->getResult() > 1)) {
	    throw DomainErrorException("acos is defined in de range [-1 , 1]");
	}
    }

    double ACosFormula::getResult(){
	if((fArgument->getResult() < -1) || (fArgument->getResult() > 1)) {
	    throw DomainErrorException("acos is defined in de range [-1 , 1]");
	}
	return (acos(fArgument->getResult()) * 180/DEF_PI);
    }
}
namespace foo {
    class bar {
        bar() {};
    };
    namespace foo1 {
        class bar {
	    bar() {};
	};
    }
    int fff(void) {
    }
};
class bar {
    bar() {};
};
namespace {
    class bar {
	bar() {};
    };
}
// Inspiration for adding namespaces and some of this test come
// from Bart Van Rompaey