-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquicktest.html
More file actions
33 lines (30 loc) · 781 Bytes
/
quicktest.html
File metadata and controls
33 lines (30 loc) · 781 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Quicktest</title>
<script src="lib/classy.js"></script>
<script>
var Coder = Class.$extend({
name: "coder",
_lines: 20,
get lines() { return this._lines; },
set lines(val) { this._lines = val; }
});
var Monkey = Coder.$extend({
name: "monkey",
get fake() { console.log("Property called instead of extended :("); },
get lines() {
return this.$super() * 2;
}
});
var coder = new Coder();
var monkey = new Monkey();
fireunit.compare(20, coder.lines, "Coder should have 20 lines");
fireunit.compare(40, monkey.lines, "Monkey should have 40 lines");
</script>
</head>
<body>
<div id="demo"></div>
</body>
</html>