Skip to content

Conversation

@devoncarew
Copy link
Contributor

import 'package:flutter/foundation.dart';
import 'package:test/test.dart';

const bool isReleaseMode = const bool.fromEnvironment("dart.vm.product");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, now that i think of this some more: this will always be false. We run all our tests in debug mode always.

});
expect(count, isReleaseMode ? 0 : 1);
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's really no good way for us to test that profile actually omits the code in release builds in the current infrastructure. At some point we should probably do a real test for this.

@Hixie
Copy link
Contributor

Hixie commented Jul 28, 2017

LGTM

...but add a comment or todo to the test mentioning that the test isn't really testing what matters. :-)

@devoncarew
Copy link
Contributor Author

devoncarew commented Jul 30, 2017

Makes sense; added We run our tests in debug mode, to this will always evaluate to false... and TODO(devoncarew): This test - while very nice - isn't testing what we really want to know: that the code in the profile closure is omitted in release mode..

@devoncarew devoncarew merged commit 561d17a into flutter:master Jul 30, 2017
Hixie added a commit that referenced this pull request Jul 31, 2017
Hixie added a commit that referenced this pull request Aug 1, 2017
* Revert "Make plugins add their repos to projects in the consuming app (#11447)"

This reverts commit abe1e25.

* Revert "Support for custom build types on Android (#11354)"

This reverts commit 87eec71.

* Revert "add a profile() method (#11443)"

This reverts commit 561d17a.

* Revert "Fix documentation based on dartdoc's warnings (#11428)"

This reverts commit 6655074.

* Revert "Improve some docs around WillPopScope. (#11429)"

This reverts commit 58a28a2.

* Revert "temporarily disable broken driver test in integration_ui (#11440)"

This reverts commit 764515e.

* Revert "style fix"

This reverts commit 00bfc86.

* Revert "tests for waitFor/waitForAbsent"

This reverts commit 31d2ee9.

* Revert "Always evaluate the finder in `driver.waitFor()` and `driver.waitForAbsent()`"

This reverts commit 11d7c79.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants