Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: dart/tests/try/web/incremental_compilation_update_test.dart

Issue 818713002: More tests of incremental compilation involving multiple libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/tests/try/web/program_result.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library trydart.incremental_compilation_update_test; 5 library trydart.incremental_compilation_update_test;
6 6
7 import 'dart:html' hide 7 import 'dart:html' hide
8 Element; 8 Element;
9 9
10 import 'dart:async' show 10 import 'dart:async' show
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 const <ProgramExpectation>[ 1649 const <ProgramExpectation>[
1650 const ProgramExpectation( 1650 const ProgramExpectation(
1651 const <String>['A(v1)']), 1651 const <String>['A(v1)']),
1652 const ProgramExpectation( 1652 const ProgramExpectation(
1653 const <String>['A(v2)', 'B(v2)', 'B(A(v2))', 'A(B(v2))']), 1653 const <String>['A(v2)', 'B(v2)', 'B(A(v2))', 'A(B(v2))']),
1654 ]), 1654 ]),
1655 1655
1656 const EncodedResult( 1656 const EncodedResult(
1657 r""" 1657 r"""
1658 ==> main.dart <== 1658 ==> main.dart <==
1659 // Test that a change in a part is handled.
1659 library test.main; 1660 library test.main;
1660 1661
1661 part 'part.dart'; 1662 part 'part.dart';
1662 1663
1663 1664
1664 ==> part.dart.patch <== 1665 ==> part.dart.patch <==
1665 part of test.main; 1666 part of test.main;
1666 1667
1667 main() { 1668 main() {
1668 <<<<<<< 1669 <<<<<<<
1669 print('Hello, World!'); 1670 print('Hello, World!');
1670 ======= 1671 =======
1671 print('Hello, Brave New World!'); 1672 print('Hello, Brave New World!');
1672 >>>>>>> 1673 >>>>>>>
1673 } 1674 }
1674 """, 1675 """,
1675 const [ 1676 const [
1676 'Hello, World!', 1677 'Hello, World!',
1677 'Hello, Brave New World!', 1678 'Hello, Brave New World!',
1678 ]), 1679 ]),
1680
1681 const EncodedResult(
1682 r"""
1683 ==> main.dart.patch <==
1684 // Test that a change in library name is handled.
1685 <<<<<<<
1686 library test.main1;
1687 =======
1688 library test.main2;
1689 >>>>>>>
1690
1691 main() {
1692 print('Hello, World!');
1693 }
1694 """,
1695 const [
1696 'Hello, World!',
1697 const ProgramExpectation(
1698 const <String>['Hello, World!'],
1699 // TODO(ahe): Shouldn't throw.
1700 compileUpdatesShouldThrow: true),
1701 ]),
1702
1703 const EncodedResult(
1704 r"""
1705 ==> main.dart.patch <==
1706 // Test that adding an import is handled.
1707 <<<<<<<
1708 =======
1709 import 'dart:core';
1710 >>>>>>>
1711
1712 main() {
1713 print('Hello, World!');
1714 }
1715 """,
1716 const [
1717 'Hello, World!',
1718 const ProgramExpectation(
1719 const <String>['Hello, World!'],
1720 // TODO(ahe): Shouldn't throw.
1721 compileUpdatesShouldThrow: true),
1722 ]),
1723
1724 const EncodedResult(
1725 r"""
1726 ==> main.dart.patch <==
1727 // Test that adding an export is handled.
1728 <<<<<<<
1729 =======
1730 export 'dart:core';
1731 >>>>>>>
1732
1733 main() {
1734 print('Hello, World!');
1735 }
1736 """,
1737 const [
1738 'Hello, World!',
1739 const ProgramExpectation(
1740 const <String>['Hello, World!'],
1741 // TODO(ahe): Shouldn't throw.
1742 compileUpdatesShouldThrow: true),
1743 ]),
1744
1745 const EncodedResult(
1746 r"""
1747 ==> main.dart.patch <==
1748 // Test that adding a part is handled.
1749 library test.main;
1750
1751 <<<<<<<
1752 =======
1753 part 'part.dart';
1754 >>>>>>>
1755
1756 main() {
1757 print('Hello, World!');
1758 }
1759
1760
1761 ==> part.dart <==
1762 part of test.main
1763 """,
1764 const [
1765 'Hello, World!',
1766 const ProgramExpectation(
1767 const <String>['Hello, World!'],
1768 // TODO(ahe): Shouldn't throw.
1769 compileUpdatesShouldThrow: true),
1770 ]),
1771
1772 const EncodedResult(
1773 r"""
1774 ==> main.dart <==
1775 // Test that changes in multiple libraries is handled.
1776 import 'library1.dart' as lib1;
1777 import 'library2.dart' as lib2;
1778
1779 main() {
1780 lib1.method();
1781 lib2.method();
1782 }
1783
1784
1785 ==> library1.dart.patch <==
1786 library test.library1;
1787
1788 method() {
1789 <<<<<<<
1790 print('lib1.v1');
1791 =======
1792 print('lib1.v2');
1793 =======
1794 print('lib1.v3');
1795 >>>>>>>
1796 }
1797
1798
1799 ==> library2.dart.patch <==
1800 library test.library2;
1801
1802 method() {
1803 <<<<<<<
1804 print('lib2.v1');
1805 =======
1806 print('lib2.v2');
1807 =======
1808 print('lib2.v3');
1809 >>>>>>>
1810 }
1811 """,
1812 const [
1813 const <String>['lib1.v1', 'lib2.v1'],
1814 const <String>['lib1.v2', 'lib2.v2'],
1815 const <String>['lib1.v3', 'lib2.v3'],
1816 ]),
1679 ]; 1817 ];
1680 1818
1681 void main() { 1819 void main() {
1682 listener.start(); 1820 listener.start();
1683 1821
1684 document.head.append(lineNumberStyle()); 1822 document.head.append(lineNumberStyle());
1685 1823
1686 summary = new SpanElement(); 1824 summary = new SpanElement();
1687 document.body.append(new HeadingElement.h1() 1825 document.body.append(new HeadingElement.h1()
1688 ..appendText("Incremental compiler tests") 1826 ..appendText("Incremental compiler tests")
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 position: absolute; 2053 position: absolute;
1916 left: 0px; 2054 left: 0px;
1917 width: 3em; 2055 width: 3em;
1918 text-align: right; 2056 text-align: right;
1919 background-color: lightgoldenrodyellow; 2057 background-color: lightgoldenrodyellow;
1920 } 2058 }
1921 '''); 2059 ''');
1922 style.type = 'text/css'; 2060 style.type = 'text/css';
1923 return style; 2061 return style;
1924 } 2062 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/try/web/program_result.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698