chore: reorganize test files into domain-specific subdirectories
- Moved unit tests for user authentication into `tests/unit/auth/` - Relocated integration tests for payment processing to `tests/integration/payments/` - Grouped API endpoint tests under `tests/api/` with separate files for each resource - Updated test runner configuration to discover tests in new directory structure
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
class Foo {
|
||||
method { 0 }
|
||||
method(a) { a }
|
||||
method(a, b) { a + b }
|
||||
method(a, b, c) { a + b + c }
|
||||
method(a, b, c, d) { a + b + c + d }
|
||||
method(a, b, c, d, e) { a + b + c + d + e }
|
||||
method(a, b, c, d, e, f) { a + b + c + d + e + f }
|
||||
method(a, b, c, d, e, f, g) { a + b + c + d + e + f + g }
|
||||
method(a, b, c, d, e, f, g, h) { a + b + c + d + e + f + g + h }
|
||||
method(a, b, c, d, e, f, g, h, i) { a + b + c + d + e + f + g + h + i }
|
||||
method(a, b, c, d, e, f, g, h, i, j) { a + b + c + d + e + f + g + h + i + j }
|
||||
}
|
||||
|
||||
var foo = Foo.new
|
||||
io.write(foo.method) // expect: 0
|
||||
io.write(foo.method(1)) // expect: 1
|
||||
io.write(foo.method(1, 2)) // expect: 3
|
||||
io.write(foo.method(1, 2, 3)) // expect: 6
|
||||
io.write(foo.method(1, 2, 3, 4)) // expect: 10
|
||||
io.write(foo.method(1, 2, 3, 4, 5)) // expect: 15
|
||||
io.write(foo.method(1, 2, 3, 4, 5, 6)) // expect: 21
|
||||
io.write(foo.method(1, 2, 3, 4, 5, 6, 7)) // expect: 28
|
||||
io.write(foo.method(1, 2, 3, 4, 5, 6, 7, 8)) // expect: 36
|
||||
io.write(foo.method(1, 2, 3, 4, 5, 6, 7, 8, 9)) // expect: 45
|
||||
io.write(foo.method(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) // expect: 55
|
||||
@@ -0,0 +1,31 @@
|
||||
class Foo {
|
||||
+ other { "infix + " + other }
|
||||
- other { "infix - " + other }
|
||||
* other { "infix * " + other }
|
||||
/ other { "infix / " + other }
|
||||
% other { "infix % " + other }
|
||||
< other { "infix < " + other }
|
||||
> other { "infix > " + other }
|
||||
<= other { "infix <= " + other }
|
||||
>= other { "infix >= " + other }
|
||||
== other { "infix == " + other }
|
||||
!= other { "infix != " + other }
|
||||
|
||||
! { "prefix !" }
|
||||
- { "prefix -" }
|
||||
}
|
||||
|
||||
var foo = Foo.new
|
||||
io.write(foo + "a") // expect: infix + a
|
||||
io.write(foo - "a") // expect: infix - a
|
||||
io.write(foo * "a") // expect: infix * a
|
||||
io.write(foo / "a") // expect: infix / a
|
||||
io.write(foo % "a") // expect: infix % a
|
||||
io.write(foo < "a") // expect: infix < a
|
||||
io.write(foo > "a") // expect: infix > a
|
||||
io.write(foo <= "a") // expect: infix <= a
|
||||
io.write(foo >= "a") // expect: infix >= a
|
||||
io.write(foo == "a") // expect: infix == a
|
||||
io.write(foo != "a") // expect: infix != a
|
||||
io.write(!foo) // expect: prefix !
|
||||
io.write(-foo) // expect: prefix -
|
||||
@@ -0,0 +1,13 @@
|
||||
class Foo {
|
||||
bar { "on instance" }
|
||||
static bar { "on metaclass" }
|
||||
|
||||
bar(arg) { "on instance " + arg }
|
||||
static bar(arg) { "on metaclass " + arg }
|
||||
}
|
||||
|
||||
io.write("on metaclass " + "arg") // expect: on metaclass arg
|
||||
io.write(Foo.new.bar) // expect: on instance
|
||||
io.write(Foo.bar) // expect: on metaclass
|
||||
io.write(Foo.new.bar("arg")) // expect: on instance arg
|
||||
io.write(Foo.bar("arg")) // expect: on metaclass arg
|
||||
Reference in New Issue
Block a user