-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
167 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
unittest { | ||
foo([ | ||
target.value.region[1], target.value.region[1], | ||
target.value.region[1], target.value.region[1], target.value.region[1] | ||
]); | ||
target.value.region[1], target.value.region[1], target.value.region[1], | ||
target.value.region[1], target.value.region[1] | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
auto find() | ||
{ | ||
return Map.findRange([ | ||
"$and": [ | ||
["deleted": Bson(false)], | ||
[ | ||
"$or": Bson([ | ||
serializeToBson(["forceUpdate": Bson(true)]), | ||
serializeToBson([ | ||
"info.approved": ["$eq": Bson(1)], | ||
"fetchDate": [ | ||
"$lte": Bson(BsonDate(currentTime - 60.days)) | ||
] | ||
]), | ||
serializeToBson([ | ||
"info.approved": ["$ne": Bson(1)], | ||
"fetchDate": [ | ||
"$lte": Bson(BsonDate(currentTime - 14.days)) | ||
] | ||
]) | ||
]) | ||
] | ||
"$and": [ | ||
["deleted": Bson(false)], | ||
[ | ||
"$or": Bson([ | ||
serializeToBson(["forceUpdate": Bson(true)]), | ||
serializeToBson([ | ||
"info.approved": ["$eq": Bson(1)], | ||
"fetchDate": [ | ||
"$lte": Bson(BsonDate(currentTime - 60.days)) | ||
] | ||
]), | ||
serializeToBson([ | ||
"info.approved": ["$ne": Bson(1)], | ||
"fetchDate": [ | ||
"$lte": Bson(BsonDate(currentTime - 14.days)) | ||
] | ||
]) | ||
]) | ||
] | ||
]); | ||
] | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
class C { | ||
abstract void f1() // | ||
in (true); | ||
|
||
abstract void f2() /* */ | ||
in (true); | ||
|
||
abstract bool f3() // | ||
out (r; r); | ||
|
||
abstract bool f4() /* */ | ||
out (r; r); | ||
|
||
abstract void f5() // | ||
do { | ||
} | ||
|
||
abstract void f6() /* */ | ||
do { | ||
} | ||
|
||
abstract bool f7() // | ||
in (true) // | ||
out (r; r) // | ||
do // | ||
{ | ||
return true; | ||
} | ||
|
||
abstract bool f8() /* */ | ||
in (true) /* */ | ||
out (r; r) /* */ | ||
do /* */ | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
void f() return | ||
do { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
unittest { | ||
functionLengthDoesMatter([ | ||
firstFunctionInChain("A").seconFunctionInChain("B").value, | ||
firstFunctionInChain("A").seconFunctionInChain("B").value | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
unittest { | ||
{ | ||
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo, | ||
Three charlie, double delta) | ||
{ | ||
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo | ||
&& foxtrot && golf && hotel && india && juliet) { | ||
} | ||
} | ||
} | ||
} | ||
|
||
void f() | ||
{ | ||
string a = "foo" | ||
~ "bar" /* bar */ | ||
~ "baz"; | ||
} | ||
|
||
unittest { | ||
if (a) { | ||
while (sBraceDepth == 0 && indents.topIsTemp() | ||
&& ((indents.top != tok!"if" && indents.top != tok!"version") | ||
|| !peekIs(tok!"else"))) | ||
a(); | ||
} | ||
} | ||
|
||
unittest { | ||
callFunc({ int i = 10; return i; }); | ||
callFunc({ | ||
int i = 10; | ||
foo(alpha, bravo, charlie, delta, echo, foxtrot, golf, echo); | ||
doStuff(withThings, andOtherStuff); | ||
return i; | ||
}); | ||
callFunc({ | ||
int i = 10; | ||
foo(alpha_longVarName, bravo_longVarName, charlie_longVarName, delta_longVarName, | ||
echo_longVarName, foxtrot_longVarName, golf_longVarName, echo_longVarName); | ||
doStuff(withThings, andOtherStuff); | ||
return i; | ||
}, more_stuff); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
unittest { | ||
{ | ||
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo, | ||
Three charlie, double delta) | ||
{ | ||
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo | ||
&& foxtrot && golf && hotel && india && juliet) { | ||
} | ||
} | ||
} | ||
} | ||
|
||
unittest { | ||
if (a) { | ||
while (sBraceDepth == 0 && indents.topIsTemp() | ||
&& ((indents.top != tok!"if" && indents.top != tok!"version") || !peekIs(tok!"else"))) | ||
a(); | ||
} | ||
} | ||
|
||
unittest { | ||
callFunc({ int i = 10; return i; }); | ||
callFunc({ | ||
int i = 10; | ||
foo(alpha, bravo, charlie, delta, echo, foxtrot, golf, echo); | ||
doStuff(withThings, andOtherStuff); | ||
return i; | ||
}); | ||
callFunc({ | ||
int i = 10; | ||
foo(alpha_longVarName, bravo_longVarName, charlie_longVarName, delta_longVarName, | ||
echo_longVarName, foxtrot_longVarName, golf_longVarName, echo_longVarName); | ||
doStuff(withThings, andOtherStuff); | ||
return i; | ||
}, more_stuff); | ||
} |