[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode 25a0b8a 128/192: Add tests for dart-format
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode 25a0b8a 128/192: Add tests for dart-format |
Date: |
Sun, 29 Aug 2021 11:02:04 -0400 (EDT) |
branch: elpa/dart-mode
commit 25a0b8ae14152fe90b7fd35f000f5903c3a827fd
Author: Brady Trainor <mail@bradyt.com>
Commit: Brady Trainor <mail@bradyt.com>
Add tests for dart-format
Tests are rudimentary.
Open file test/idempotent.dart, format with C-c C-o, and we find that
dart-format is not idempotent. After third call dart-format is
idempotent, in this case.
Open test/breaks.dart, and C-c C-o changes code, not just whitespace.
---
test/breaks.dart | 18 ++++++++++++++++++
test/idempotent.dart | 12 ++++++++++++
2 files changed, 30 insertions(+)
diff --git a/test/breaks.dart b/test/breaks.dart
new file mode 100644
index 0000000..3fc7a12
--- /dev/null
+++ b/test/breaks.dart
@@ -0,0 +1,18 @@
+class _LoginPageState extends State<LoginPage> {
+ Widget build(BuildContext context) {
+ return new Scaffold(
+ body: new SafeArea(
+ child: new ListView(
+ padding: const EdgeInsets.symmetric(horizontal: 24.0),
+ children: <Widget>[
+ new Column(
+ ),
+ const SizedBox(height: 120.0),
+ TextField(
+ decoration: InputDecoration(
+ filled: true,
+ ),
+ ),
+ ])));
+ }
+}
\ No newline at end of file
diff --git a/test/idempotent.dart b/test/idempotent.dart
new file mode 100644
index 0000000..22fd62c
--- /dev/null
+++ b/test/idempotent.dart
@@ -0,0 +1,12 @@
+class DartFormatter {
+ DartFormatter(
+ {this.lineEnding, int pageWidth, int indent, Iterable<StyleFix> fixes})
+ : pageWidth = pageWidth ?? 80,
+ indent = indent ?? 0 {}
+
+ String format(String source, {uri}) {
+ return formatSource(
+ new SourceCode(source, uri: uri, isCompilationUnit: true))
+ .text;
+ }
+}
\ No newline at end of file
- [nongnu] elpa/dart-mode eea1000 093/192: Highlight hover dartdoc, (continued)
- [nongnu] elpa/dart-mode eea1000 093/192: Highlight hover dartdoc, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 907cba5 095/192: Indicate deprecated hovers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 8e09b68 120/192: Exclusively use cl-lib to avoid byte-compilation inconsistencies, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1249417 108/192: Better handle zero-argument functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 0277dad 107/192: Include parameter documentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 73d0ebc 135/192: Merge branch 'refactor-tests', ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 4feac34 123/192: Make sure to provide the full buffer in dart-add-analysis-overlay, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e01234a 113/192: Use funcall rather than apply where appropriate, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode eba375b 112/192: Parse JSON arrays as lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 905ce53 117/192: Fix a bunch of byte-compilation warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 25a0b8a 128/192: Add tests for dart-format,
ELPA Syncer <=
- [nongnu] elpa/dart-mode d1a0c5e 103/192: Fall back to normal expansion, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 613b311 111/192: Stop using lexical let, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 950d3a8 133/192: Add emacs versions 24.3 and snapshot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a4126bd 121/192: Allow s 1.10, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 52034c7 110/192: Add a dart--get helper to make it easier to use JSON, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode f3a7c7b 122/192: Properly tell flycheck when there are no errors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1153c53 134/192: Add ert-runner, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 2a95005 159/192: Fix typo in README, regarding M-/ fallback, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c30eaa9 140/192: Specify path to the dart-sdk inside of flutter, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d9a12e1 151/192: Fontifies function declarations, ELPA Syncer, 2021/08/29