mirror of https://github.com/AMT-Cheif/drift.git
Skip complex datetime test on old versions
This commit is contained in:
parent
eea63cb5c9
commit
4856ba4c5b
|
@ -70,7 +70,9 @@ void _testWith(TodoDb Function() openDb, {bool dateTimeAsText = false}) {
|
|||
const Duration(days: 1).inSeconds);
|
||||
});
|
||||
|
||||
test('extracting values', () {
|
||||
test(
|
||||
'extracting values',
|
||||
() {
|
||||
final expr = Variable.withDateTime(DateTime.utc(2020, 09, 03, 23, 55));
|
||||
|
||||
expect(eval(expr.year), completion(2020));
|
||||
|
@ -85,12 +87,16 @@ void _testWith(TodoDb Function() openDb, {bool dateTimeAsText = false}) {
|
|||
completion('2020-09-06'));
|
||||
expect(eval(expr.time), completion('23:55:00'));
|
||||
expect(eval(expr.datetime), completion('2020-09-03 23:55:00'));
|
||||
expect(
|
||||
eval(expr.julianday), completion(closeTo(2459096.496527778, 0.0001)));
|
||||
expect(eval(expr.julianday),
|
||||
completion(closeTo(2459096.496527778, 0.0001)));
|
||||
expect(eval(expr.unixepoch), completion(1599177300));
|
||||
expect(eval(expr.strftime('%Y-%m-%d %H:%M:%S')),
|
||||
completion('2020-09-03 23:55:00'));
|
||||
});
|
||||
},
|
||||
skip: sqlite3Version.versionNumber < 3039000
|
||||
? 'Requires sqlite 3.39'
|
||||
: null,
|
||||
);
|
||||
|
||||
DateTime result(DateTime date) {
|
||||
if (dateTimeAsText) {
|
||||
|
|
Loading…
Reference in New Issue