{"commit":"ed4d75911f74561afe8875eacfa7250b21b77796","old_file":"collection\/source\/ceylon\/collection\/makeCellArray.ceylon","new_file":"collection\/source\/ceylon\/collection\/makeCellArray.ceylon","old_contents":"\nArrayItem>?> makeCellEntryArray(Integer size) \n given Key satisfies Object \n given Item satisfies Object {\n\n return makeArrayItem>?>(size, (Integer index) null);\n}\nArray?> makeCellElementArray(Integer size) {\n return makeArray?>(size, (Integer index) null);\n}","new_contents":"\nArrayItem>?> makeCellEntryArray(Integer size) \n given Key satisfies Object \n given Item satisfies Object {\n\n return arrayOfSizeItem>?>(size, null);\n}\nArray?> makeCellElementArray(Integer size) {\n return arrayOfSize?>(size, null);\n}","subject":"Change makeArray -> arrayOfSize to fix compilation error","message":"Change makeArray -> arrayOfSize to fix compilation error\n","lang":"Ceylon","license":"apache-2.0","repos":"vietj\/ceylon-sdk,ASzc\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,unratito\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,rohitmohan96\/ceylon-sdk,unratito\/ceylon-sdk,ASzc\/ceylon-sdk,jvasileff\/ceylon-sdk,DiegoCoronel\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,DiegoCoronel\/ceylon-sdk,vietj\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,jvasileff\/ceylon-sdk,matejonnet\/ceylon-sdk"} {"commit":"298f6baa3580d464430d258e27f446202809b9e0","old_file":"test-source\/test\/ceylon\/build\/runner\/include-annotations-discovery.ceylon","new_file":"test-source\/test\/ceylon\/build\/runner\/include-annotations-discovery.ceylon","old_contents":"import ceylon.language.meta.declaration { Module }\nimport ceylon.test { test, assertEquals }\nimport ceylon.build.runner { findTopLevelAnnotatedGoals, findAnnotatedIncludes }\nimport mock.ceylon.build.runner.mock4 { include1, include2 }\nimport mock.ceylon.build.runner.mock4.subpackage { include3 }\n\ntest void shouldNotFindIncludeAnnotatedValuesIfNoPackage() {\n Module mod = `module mock.ceylon.build.runner.mock1`;\n value results = findTopLevelAnnotatedGoals(mod);\n assertEquals(results, []);\n}\n\ntest void shouldNotFindIncludeAnnotatedValuesInEmptyPackages() {\n Module mod = `module mock.ceylon.build.runner.mock2`;\n value results = findTopLevelAnnotatedGoals(mod);\n assertEquals(results, []);\n}\n\ntest void shouldNotFindIncludeAnnotatedValuesIfNoValuesAnnotatedWithIt() {\n Module mod = `module mock.ceylon.build.runner.mock3`;\n value results = findTopLevelAnnotatedGoals(mod);\n assertEquals(results, []);\n}\n\ntest void shouldFindIncludeAnnotatedValues() {\n Module mod = `module mock.ceylon.build.runner.mock4`;\n value results = [].chain(findAnnotatedIncludes(mod));\n value expected = [`value include1`, `value include2`, `value include3`];\n assertEquals(results, expected);\n}\n","new_contents":"import ceylon.build.runner {\n\tfindTopLevelAnnotatedGoals,\n\tfindAnnotatedIncludes\n}\nimport ceylon.collection {\n\tHashSet\n}\nimport ceylon.language.meta.declaration {\n\tModule,\n\tValueDeclaration\n}\nimport ceylon.test {\n\ttest,\n\tassertEquals\n}\n\nimport mock.ceylon.build.runner.mock4 {\n\tinclude1,\n\tinclude2\n}\nimport mock.ceylon.build.runner.mock4.subpackage {\n\tinclude3\n}\n\ntest void shouldNotFindIncludeAnnotatedValuesIfNoPackage() {\n Module mod = `module mock.ceylon.build.runner.mock1`;\n value results = findTopLevelAnnotatedGoals(mod);\n assertEquals(results, []);\n}\n\ntest void shouldNotFindIncludeAnnotatedValuesInEmptyPackages() {\n Module mod = `module mock.ceylon.build.runner.mock2`;\n value results = findTopLevelAnnotatedGoals(mod);\n assertEquals(results, []);\n}\n\ntest void shouldNotFindIncludeAnnotatedValuesIfNoValuesAnnotatedWithIt() {\n Module mod = `module mock.ceylon.build.runner.mock3`;\n value results = findTopLevelAnnotatedGoals(mod);\n assertEquals(results, []);\n}\n\ntest void shouldFindIncludeAnnotatedValues() {\n Module mod = `module mock.ceylon.build.runner.mock4`;\n value results = [].chain(findAnnotatedIncludes(mod));\n value expected = [`value include1`, `value include2`, `value include3`];\n containSameElements(results, expected);\n}\n\nvoid containSameElements({ValueDeclaration*} actual, {ValueDeclaration*} expected) {\n assertEquals(HashSet { elements = actual; } , HashSet { elements = expected; });\n}","subject":"Fix unstable test by not checking collections order","message":"Fix unstable test by not checking collections order\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.build,HenningB\/ceylon.build,ceylon\/ceylon.build,HenningB\/ceylon.build"} {"commit":"19e1b02c6fdeeebd2944dafbebafd650fa63c157","old_file":"source-gen\/source_gen\/ceylon\/formatter\/formattingOptions\/formattingOptions.ceylon","new_file":"source-gen\/source_gen\/ceylon\/formatter\/formattingOptions\/formattingOptions.ceylon","old_contents":"{FormattingOption+} formattingOptions = {\n FormattingOption {\n \t\"The indentation mode of the formatter.\";\n \t\"IndentMode\"; \"indentMode\"; \/* = *\/ \"Spaces(4)\";\n }\n};","new_contents":"{FormattingOption+} formattingOptions = {\n FormattingOption {\n \"The indentation mode.\";\n \"IndentMode\"; \"indentMode\"; \/* = *\/ \"Spaces(4)\";\n },\n FormattingOption {\n \"The maximum line length, or `null` for unlimited line length.\";\n \"Integer?\"; \"maxLineLength\"; \/* = *\/ \"null\";\n }\n};","subject":"Add a \"maxLineLength\" formatting option.","message":"Add a \"maxLineLength\" formatting option.\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"4ab67340c901782c29d091a50e23f4aaf1cf40e7","old_file":"test-samples\/higherTypes.ceylon","new_file":"test-samples\/higherTypes.ceylon","old_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\n","new_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\nvalue namedArgsInvocWithFunctionArgWithTypeParam = f {\n function f(T t) {\n return t;\n }\n};\n","subject":"Add test for named arg funs with type params","message":"Add test for named arg funs with type params\n\nPart of #108.\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"b0706372e4a6f93fcdc214ecd1a4fa5c75e7fd42","old_file":"src\/test\/ceylon\/members\/outer.ceylon","new_file":"src\/test\/ceylon\/members\/outer.ceylon","old_contents":"import check {...}\n\nvoid test_outer_inner_safety() {\n class Outer() {\n shared class Inner() { }\n }\n Outer? o = null;\n Outer.Inner? i1 = o?.Inner();\n Outer.Inner? cons() = o?.Inner();\n if (exists i1) {\n fail(\"i1 should be null\");\n }\n check(className(cons)==\"ceylon.language::JsCallable\", \"cons is Callable\");\n Outer.Inner|Nothing i2 = cons();\n if (exists i2) {\n fail(\"i2 should not exist\");\n }\n}\n","new_contents":"import check {...}\n\nvoid test_outer_inner_safety() {\n class Outer() {\n shared class Inner() { }\n }\n Outer? o = null;\n Outer.Inner? i1 = o?.Inner();\n Outer.Inner? cons() = o?.Inner();\n if (exists i1) {\n fail(\"i1 should be null\");\n }\n check(className(cons)==\"ceylon.language::JsCallable\", \"cons is Callable, \" className(cons) \"\");\n Outer.Inner|Nothing i2 = cons();\n if (exists i2) {\n fail(\"i2 should not exist\");\n }\n}\n","subject":"Print obtained classname in error message","message":"Print obtained classname in error message\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon-js,ceylon\/ceylon-js,ceylon\/ceylon-js"} {"commit":"40bf453440e42028cf8331a567d7a0c4e68001b1","old_file":"runtime\/ceylon\/language\/SimpleList.ceylon","new_file":"runtime\/ceylon\/language\/SimpleList.ceylon","old_contents":"public class SimpleList (T? head, SimpleList? tail)\n satisfies Iterable\n{\n public T? car = head;\n public SimpleList ? cdr = tail;\n\n public Iterator iterator() {\n return SimpleIterator(this);\n }\n\n public class SimpleIterator (SimpleList ? l)\n satisfies Iterator\n {\n SimpleList ? list = l;\n\n T? head() {\n if (exists list) {\n return list.car;\n } else {\n return null;\n }\n }\n\n Iterator tail() {\n if (exists list) {\n return SimpleIterator(list.cdr);\n } else {\n return SimpleIterator(null);\n }\n }\n }\n}\n","new_contents":"public class SimpleList (T? head, SimpleList? tail)\n satisfies Iterable\n{\n public Iterator iterator() {\n return SimpleIterator(this);\n }\n\n public class SimpleIterator (SimpleList ? list)\n satisfies Iterator\n {\n T? head() {\n if (exists list) {\n return list.head;\n } else {\n return null;\n }\n }\n\n Iterator tail() {\n if (exists list) {\n return SimpleIterator(list.tail);\n } else {\n return SimpleIterator(null);\n }\n }\n }\n}\n","subject":"Fix optional types in back-end.","message":"Fix optional types in back-end.\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.language,jvasileff\/ceylon.language,unratito\/ceylon.language,lucaswerkmeister\/ceylon.language,unratito\/ceylon.language,jvasileff\/ceylon.language,ceylon\/ceylon.language,lucaswerkmeister\/ceylon.language"} {"commit":"ba88358284c44440400da23dcdb8c2da2618f4b3","old_file":"test\/metamodel\/bug347.ceylon","new_file":"test\/metamodel\/bug347.ceylon","old_contents":"import ceylon.language.meta { modules }\nimport ceylon.language.meta.declaration { ClassDeclaration }\n\nshared final annotation class TestAnnotation()\n satisfies OptionalAnnotation {\n}\n\n@test\nshared void bug347() {\n for (value m in modules.list) {\n if(m.name.startsWith(\"org.apache\") \n || m.name.startsWith(\"com.redhat.ceylon.maven-support\")\n || m.name.startsWith(\"org.jboss.jandex\")){\n continue;\n }\n for (value member in m.members) {\n value components = member.annotatedMembers();\n assert(components == []);\n }\n }\n}\n","new_contents":"import ceylon.language.meta { modules }\nimport ceylon.language.meta.declaration { ClassDeclaration }\n\nshared final annotation class TestAnnotation()\n satisfies OptionalAnnotation {\n}\n\n@test\nshared void bug347() {\n for (value m in modules.list) {\n if(m.name.startsWith(\"org.apache\") \n || m.name.startsWith(\"com.redhat.ceylon.maven-support\")\n || m.name.startsWith(\"org.antlr\")\n || m.name.startsWith(\"org.jboss.jandex\")){\n continue;\n }\n for (value member in m.members) {\n value components = member.annotatedMembers();\n assert(components == []);\n }\n }\n}\n","subject":"Make tests handle antlr module debug package","message":"Make tests handle antlr module debug package\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.language,ceylon\/ceylon.language,unratito\/ceylon.language,unratito\/ceylon.language"} {"commit":"33d9cac4408ce9fe1c0c527047af374a71e5cdab","old_file":"source\/test\/ceylon\/ast\/redhat\/ValueDeclaration.ceylon","new_file":"source\/test\/ceylon\/ast\/redhat\/ValueDeclaration.ceylon","old_contents":"import ceylon.ast.core {\n Annotations,\n ValueDeclaration,\n DynamicModifier,\n LIdentifier,\n Type\n}\nimport ceylon.ast.redhat {\n RedHatTransformer,\n valueDeclarationToCeylon,\n compileValueDeclaration\n}\nimport com.redhat.ceylon.compiler.typechecker.tree {\n Tree {\n JAttributeDeclaration=AttributeDeclaration\n }\n}\n\nshared object valueDeclaration satisfies ConcreteTest {\n \n String->ValueDeclaration construct(String->LIdentifier name, String->Type|DynamicModifier type, String->Annotations annotations)\n => \"``annotations.key`` ``type.key`` ``name.key``;\"->ValueDeclaration(name.item, type.item, annotations.item);\n \n shared String->ValueDeclaration lidValueDeclaration = construct(identifier.lidLIdentifier, dynamicModifier.dynamicModifier, annotations.emptyAnnotations);\n shared String->ValueDeclaration annotatedByValueDeclaration = construct(identifier.byLIdentifier, unionType.stringOrIntegerOrFloatUnionType, annotations.helloSharedByLucasAnnotations);\n \n compile = compileValueDeclaration;\n fromCeylon = RedHatTransformer.transformValueDeclaration;\n toCeylon = valueDeclarationToCeylon;\n codes = [lidValueDeclaration, annotatedByValueDeclaration];\n}\n","new_contents":"import ceylon.ast.core {\n Annotations,\n ValueDeclaration,\n DynamicModifier,\n LIdentifier,\n Type,\n VariadicType\n}\nimport ceylon.ast.redhat {\n RedHatTransformer,\n valueDeclarationToCeylon,\n compileValueDeclaration\n}\nimport com.redhat.ceylon.compiler.typechecker.tree {\n Tree {\n JAttributeDeclaration=AttributeDeclaration\n }\n}\n\nshared object valueDeclaration satisfies ConcreteTest {\n \n String->ValueDeclaration construct(String->LIdentifier name, String->Type|VariadicType|DynamicModifier type, String->Annotations annotations)\n => \"``annotations.key`` ``type.key`` ``name.key``;\"->ValueDeclaration(name.item, type.item, annotations.item);\n \n shared String->ValueDeclaration lidValueDeclaration = construct(identifier.lidLIdentifier, dynamicModifier.dynamicModifier, annotations.emptyAnnotations);\n shared String->ValueDeclaration annotatedByValueDeclaration = construct(identifier.byLIdentifier, unionType.stringOrIntegerOrFloatUnionType, annotations.helloSharedByLucasAnnotations);\n shared String->ValueDeclaration variadicValueDeclaration = construct(identifier.lidLIdentifier, variadicType.iterableOfStringPlusType, annotations.emptyAnnotations);\n \n compile = compileValueDeclaration;\n fromCeylon = RedHatTransformer.transformValueDeclaration;\n toCeylon = valueDeclarationToCeylon;\n codes = [lidValueDeclaration, annotatedByValueDeclaration];\n}\n","subject":"Add tests for variadic value declaration","message":"Add tests for variadic value declaration\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"f903853e3a4c94eae72cf59a763bfcb098acce22","old_file":"src\/test\/ceylon\/functions\/anonymous.ceylon","new_file":"src\/test\/ceylon\/functions\/anonymous.ceylon","old_contents":"import assert { ... }\n\nElement? find(Array a, Boolean f(Element x)) {\n for (Element e in a) {\n if (f(e)) {\n return e;\n }\n }\n return null;\n}\n\nvoid testAnonymous() {\n print(\"Testing anonymous functions...\");\n value nums = array(1,2,3,4,5);\n \/\/Test positional argument call\n variable value found := find(nums, (Integer i) i%2==0);\n if (exists i=found) {\n assert(i == 2, \"anonfunc positional\");\n } else { fail(\"anonfunc positional\"); }\n \/\/Named argument call\n found := find{\n function f(Integer i) {\n return i%2==0;\n }\n a=nums;\n };\n if (exists i=found) {\n assert(i == 2, \"anonfunc named\");\n } else { fail(\"anonfunc named\"); }\n}\n","new_contents":"import assert { ... }\n\nElement? find(Array a, Boolean f(Element x)) {\n for (Element e in a) {\n if (f(e)) {\n return e;\n }\n }\n return null;\n}\n\nvoid testAnonymous() {\n print(\"Testing anonymous functions...\");\n value nums = array(1,2,3,4,5);\n \/\/Test positional argument call\n variable value found := find(nums, (Integer i) i%2==0);\n if (exists i=found) {\n assert(i == 2, \"anonfunc positional\");\n } else { fail(\"anonfunc positional\"); }\n \/\/Named argument call\n found := find{\n function f(Integer i) {\n return i%2==0;\n }\n a=nums;\n };\n if (exists i=found) {\n assert(i == 2, \"anonfunc named\");\n } else { fail(\"anonfunc named\"); }\n\n \/\/Gavin's test\n void callFunction(String f(Integer i)) {\n print(f(0));\n }\n\n function f(Integer i) {\n return (i+12).string;\n }\n callFunction(f);\n\n callFunction((Integer i) (i*3).string);\n\n callFunction {\n function f(Integer i) {\n return (i**2).string;\n }\n };\n\n}\n","subject":"Add Gavin's tests for the 3 styles of higher-order function calling","message":"Add Gavin's tests for the 3 styles of higher-order function calling\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon-js,ceylon\/ceylon-js,ceylon\/ceylon-js"} {"commit":"288c8d4b59e3471163b4f733536ab54928525ef7","old_file":"src\/ceylon\/language\/serialization\/Deconstructed.ceylon","new_file":"src\/ceylon\/language\/serialization\/Deconstructed.ceylon","old_contents":"import ceylon.language.meta.model {\n Attribute,\n Type\n}\nimport ceylon.language.meta.declaration {\n ValueDeclaration,\n TypeParameter\n}\n\n\"Contract for flattening the state of an instance of a class. \n This interface is implemented by a serialization library.\"\nshared interface Deconstructor {\n \n \"Adds the given type argument of the given type parameter to the flattened state.\"\n throws (`class AssertionError`,\n \"if there is already a value for the given type argument\")\n shared formal void putTypeArgument(TypeParameter typeParameter, Type typeArgument);\n \n \"Adds the value of the given attribute to the flattened state.\"\n throws (`class AssertionError`,\n \"if there is already a value for the given attribute\")\n shared formal void putValue(ValueDeclaration attribute, Type referenced);\n}\n\n\"The flattened state of an instance of a class.\n This interface is implemented by a serialization library.\"\nshared interface Deconstructed\n satisfies {[ValueDeclaration, Anything]*} {\n \n \"Get the type argument of the given type parameter\"\n throws (`class AssertionError`,\n \"if the type argument is missing\")\n shared formal Type getTypeArgument(TypeParameter typeParameter);\n \n \"Get the value of the given attribute.\"\n throws (`class AssertionError`,\n \"if the value is missing\")\n shared formal Type|Reference getValue(ValueDeclaration attribute);\n}\n","new_contents":"import ceylon.language.meta.model {\n Attribute,\n Type\n}\nimport ceylon.language.meta.declaration {\n ValueDeclaration,\n TypeParameter\n}\n\n\"Contract for flattening the state of an instance of a class. \n This interface is implemented by a serialization library.\"\nshared interface Deconstructor {\n \n \"Adds the given type argument of the given type parameter to the flattened state.\"\n throws (`class AssertionError`,\n \"if there is already a value for the given type argument\")\n shared formal void putTypeArgument(TypeParameter typeParameter, Type typeArgument);\n \n \"Adds the value of the given attribute to the flattened state.\"\n throws (`class AssertionError`,\n \"if there is already a value for the given attribute\")\n shared formal void putValue(ValueDeclaration attribute, Type referenced);\n \n shared formal void putArray(ValueDeclaration attribute, Array array);\n}\n\n\"The flattened state of an instance of a class.\n This interface is implemented by a serialization library.\"\nshared interface Deconstructed\n satisfies {[ValueDeclaration, Anything]*} {\n \n \"Get the type argument of the given type parameter\"\n throws (`class AssertionError`,\n \"if the type argument is missing\")\n shared formal Type getTypeArgument(TypeParameter typeParameter);\n \n \"Get the value of the given attribute.\"\n throws (`class AssertionError`,\n \"if the value is missing\")\n shared formal Type|Reference getValue(ValueDeclaration attribute);\n \n shared formal Array array\n getArray(ValueDeclaration attribute);\n}\n","subject":"Add support for persisting arrays.","message":"S11N: Add support for persisting arrays.\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.language,ceylon\/ceylon.language,unratito\/ceylon.language,jvasileff\/ceylon.language,jvasileff\/ceylon.language,unratito\/ceylon.language"} {"commit":"1625bb893e2c9765c79d0ba35e55faa2c7155b15","old_file":"source\/ceylon\/formatter\/module.ceylon","new_file":"source\/ceylon\/formatter\/module.ceylon","old_contents":"\"A formatter for the Ceylon programming language.\"\nmodule ceylon.formatter \"1.0.0\" {\n shared import java.base \"7\";\n shared import com.redhat.ceylon.typechecker \"1.0.0\";\n shared import org.antlr.runtime \"3.4\";\n import ceylon.time \"1.0.0\";\n import ceylon.interop.java \"1.0.0\";\n import ceylon.collection \"1.0.0\";\n import ceylon.file \"1.0.0\";\n}\n","new_contents":"\"A formatter for the Ceylon programming language.\"\nmodule ceylon.formatter \"1.0.0\" {\n shared import java.base \"7\";\n shared import com.redhat.ceylon.typechecker \"1.0.0\";\n shared import 'org.antlr-runtime' \"3.4\";\n import ceylon.time \"1.0.0\";\n import ceylon.interop.java \"1.0.0\";\n import ceylon.collection \"1.0.0\";\n import ceylon.file \"1.0.0\";\n}\n","subject":"Update import of ANTLR runtime","message":"Update import of ANTLR runtime","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"6bc551c905102d13330c28c34259f78572d4adf7","old_file":"plugins\/com.redhat.ceylon.eclipse.ui\/ceylon\/source\/com\/redhat\/ceylon\/eclipse\/ui\/module.ceylon","new_file":"plugins\/com.redhat.ceylon.eclipse.ui\/ceylon\/source\/com\/redhat\/ceylon\/eclipse\/ui\/module.ceylon","old_contents":"\"Module that allows developping the Ceylon IDE in Ceylon\"\nby(\"David Festal\")\nmodule com.redhat.ceylon.eclipse.ui \"1.1.1\" {\n shared import com.redhat.ceylon.typechecker \"1.1.1\";\n shared import com.redhat.ceylon.model \"1.1.1\";\n shared import ceylon.collection \"1.1.1\";\n import ceylon.interop.java \"1.1.1\";\n shared import java.base \"7\";\n}\n","new_contents":"\"Module that allows developping the Ceylon IDE in Ceylon\"\nby(\"David Festal\")\nnative(\"java\")\nmodule com.redhat.ceylon.eclipse.ui \"1.1.1\" {\n shared import com.redhat.ceylon.typechecker \"1.1.1\";\n shared import com.redhat.ceylon.model \"1.1.1\";\n shared import ceylon.collection \"1.1.1\";\n import ceylon.interop.java \"1.1.1\";\n shared import java.base \"7\";\n}\n","subject":"Add the required native annotation","message":"Add the required native annotation","lang":"Ceylon","license":"epl-1.0","repos":"rohitmohan96\/ceylon-ide-eclipse,rohitmohan96\/ceylon-ide-eclipse"} {"commit":"b42acfbf94e768d50122cce043a0861fb8d44d21","old_file":"src\/ceylon\/language\/mapPairs.ceylon","new_file":"src\/ceylon\/language\/mapPairs.ceylon","old_contents":"\"Given two streams, form a new stream by applying a \n function to the arguments in the given streams. The \n length of the resulting stream is the length of \n the shorter of the two given streams.\n \n Thus:\n \n mapPairs(xs,ys,fun)[i]==fun(xs[i],ys[i])\n \n for every `0<=i(\n Result collecting(FirstArgument firstArg, SecondArgument secondArg),\n {FirstArgument*} firstArguments, \n {SecondArgument*} secondArguments\n) {\n object iterable satisfies {Result*} {\n shared actual Iterator iterator() {\n value first = firstArguments.iterator();\n value second = secondArguments.iterator();\n object iterator satisfies Iterator {\n shared actual Result|Finished next() {\n if (!is Finished firstArg=first.next(),\n !is Finished secondArg=second.next()) {\n return collecting(firstArg,secondArg);\n }\n else {\n return finished;\n }\n }\n }\n return iterator;\n }\n }\n return iterable;\n}\n","new_contents":"\"Given two streams, form a new stream by applying a \n function to the arguments in the given streams. The \n length of the resulting stream is the length of \n the shorter of the two given streams.\n \n Thus:\n \n mapPairs(fun,xs,ys)[i]==fun(xs[i],ys[i])\n \n for every `0<=i(\n Result collecting(FirstArgument firstArg, SecondArgument secondArg),\n {FirstArgument*} firstArguments, \n {SecondArgument*} secondArguments\n) {\n object iterable satisfies {Result*} {\n shared actual Iterator iterator() {\n value first = firstArguments.iterator();\n value second = secondArguments.iterator();\n object iterator satisfies Iterator {\n shared actual Result|Finished next() {\n if (!is Finished firstArg=first.next(),\n !is Finished secondArg=second.next()) {\n return collecting(firstArg,secondArg);\n }\n else {\n return finished;\n }\n }\n }\n return iterator;\n }\n }\n return iterable;\n}\n","subject":"Fix wrong order of arguments in doc","message":"Fix wrong order of arguments in doc","lang":"Ceylon","license":"apache-2.0","repos":"lucaswerkmeister\/ceylon.language,jvasileff\/ceylon.language,jvasileff\/ceylon.language,unratito\/ceylon.language,unratito\/ceylon.language,ceylon\/ceylon.language,lucaswerkmeister\/ceylon.language,ceylon\/ceylon.language"} {"commit":"7934301c78924b2fcc97acb1a8adc59d9981fb77","old_file":"source\/ceylon\/buffer\/charset\/lookup.ceylon","new_file":"source\/ceylon\/buffer\/charset\/lookup.ceylon","old_contents":"import ceylon.buffer.codec {\n buildCodecLookup\n}\n\n\"A mapping of all supported character sets.\n \n Currently this lists contains:\n \n - ASCII\n - ISO 8859 1\n - UTF-8\n - UTF-16\n \"\nshared Map charsetsByAlias = buildCodecLookup {\n utf8\n};\n","new_contents":"import ceylon.buffer.codec {\n buildCodecLookup\n}\n\n\"A mapping of all supported character sets.\n \n Currently this lists contains:\n \n - ASCII\n - ISO 8859 1\n - UTF-8\n - UTF-16\n \"\nshared Map charsetsByAlias = buildCodecLookup {\n utf8,\n utf16,\n iso_8859_1,\n ascii\n};\n","subject":"Add missing charsets to charsetsByAlias","message":"Add missing charsets to charsetsByAlias\n","lang":"Ceylon","license":"apache-2.0","repos":"ASzc\/ceylon-sdk,ASzc\/ceylon-sdk,rohitmohan96\/ceylon-sdk,matejonnet\/ceylon-sdk"} {"commit":"dd53ee32b680cd53d1dec28c501567bb3b16027b","old_file":"source\/ceylon\/collection\/group.ceylon","new_file":"source\/ceylon\/collection\/group.ceylon","old_contents":"doc \"Creates a `Map` that contains the `Iterable`'s\n elements, grouped in `Sequence`s under the\n keys provided by the grouping function.\"\nshared Map group({Element*} elements,\n \"A function that returns the key under which to group the \n specified element.\"\n Group grouping(Element element)) given Group satisfies Object {\n \n \/*\n We've no idea how long the iterable is, nor how selective the grouping \n function is, so it's really had to accurately estimate the size of the\n HashMap.\n *\/\n value map = HashMap>() ;\n \n for (Element element in elements) {\n Group group = grouping(element);\n \n value sb = map.get(group);\n if (is SequenceBuilder sb) {\n sb.append(element);\n } else {\n map.put(group, SequenceBuilder().append(element));\n }\n }\n \n print(map);\n \n Sequence fn(Group key, SequenceBuilder item) {\n value sequence = item.sequence;\n assert(is Sequence sequence);\n return sequence;\n }\n \n return map.mapItems(fn);\n \n}","new_contents":"doc \"Creates a `Map` that contains the `Iterable`'s\n elements, grouped in `Sequence`s under the\n keys provided by the grouping function.\"\nshared Map group({Element*} elements,\n \"A function that returns the key under which to group the \n specified element.\"\n Group grouping(Element element)) given Group satisfies Object {\n \n \/*\n We've no idea how long the iterable is, nor how selective the grouping \n function is, so it's really had to accurately estimate the size of the\n HashMap.\n *\/\n value map = HashMap>() ;\n \n for (Element element in elements) {\n Group group = grouping(element);\n \n value sb = map.get(group);\n if (is SequenceBuilder sb) {\n sb.append(element);\n } else {\n map.put(group, SequenceBuilder().append(element));\n }\n }\n \n Sequence fn(Group key, SequenceBuilder item) {\n value sequence = item.sequence;\n assert(is Sequence sequence);\n return sequence;\n }\n \n return map.mapItems(fn);\n \n}","subject":"Remove accidental call to print()","message":"Remove accidental call to print()\n","lang":"Ceylon","license":"apache-2.0","repos":"jvasileff\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,unratito\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,unratito\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,vietj\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,ASzc\/ceylon-sdk,rohitmohan96\/ceylon-sdk,matejonnet\/ceylon-sdk,DiegoCoronel\/ceylon-sdk,DiegoCoronel\/ceylon-sdk,ASzc\/ceylon-sdk,jvasileff\/ceylon-sdk,vietj\/ceylon-sdk"} {"commit":"20bbaaeccec708de2efa7838b7da149dbc89dbfe","old_file":"src\/test\/ceylon\/misc\/aliases.ceylon","new_file":"src\/test\/ceylon\/misc\/aliases.ceylon","old_contents":"import check { ... }\n\nshared class AliasingClass() {\n shared interface AliasingIface {\n shared Boolean aliasingIface() { return true; }\n }\n shared class AliasingInner() {\n shared Boolean aliasingInner() { return true; }\n }\n}\n\nclass AliasingSubclass() extends AliasingClass() {\n shared class InnerAlias() = AliasingInner;\n shared class SubAlias() extends InnerAlias() {}\n\n shared Boolean aliasingSubclass() {\n return SubAlias().aliasingInner();\n }\n shared interface AliasedIface = AliasingIface;\n}\n\nclass AliasingSub2() extends AliasingSubclass() {\n shared AliasedIface iface {\n object aliased satisfies AliasedIface {\n }\n return aliased;\n }\n}\n\nvoid testAliasing() {\n print(\"testing type aliases\");\n check(AliasingSubclass().aliasingSubclass(), \"Aliased member class\");\n class InnerSubalias() = AliasingSubclass;\n check(InnerSubalias().aliasingSubclass(), \"Aliased top-level class\");\n interface AliasedIface2 = AliasingClass.AliasingIface;\n Boolean use(AliasedIface2 aif) { return aif.aliasingIface(); }\n check(use(AliasingSub2().iface), \"Aliased member interface\");\n \n}\n","new_contents":"import check { ... }\n\nalias Strinteger = String|Integer;\n\nshared class AliasingClass() {\n shared interface AliasingIface {\n shared Boolean aliasingIface() { return true; }\n }\n shared class AliasingInner() {\n shared Boolean aliasingInner() { return true; }\n }\n}\n\nclass AliasingSubclass() extends AliasingClass() {\n shared class InnerAlias() = AliasingInner;\n shared class SubAlias() extends InnerAlias() {}\n\n shared Boolean aliasingSubclass() {\n return SubAlias().aliasingInner();\n }\n shared interface AliasedIface = AliasingIface;\n}\n\nclass AliasingSub2() extends AliasingSubclass() {\n shared AliasedIface iface {\n object aliased satisfies AliasedIface {\n }\n return aliased;\n }\n}\n\nvoid testAliasing() {\n print(\"testing type aliases\");\n check(AliasingSubclass().aliasingSubclass(), \"Aliased member class\");\n class InnerSubalias() = AliasingSubclass;\n check(InnerSubalias().aliasingSubclass(), \"Aliased top-level class\");\n interface AliasedIface2 = AliasingClass.AliasingIface;\n Boolean use(AliasedIface2 aif) { return aif.aliasingIface(); }\n check(use(AliasingSub2().iface), \"Aliased member interface\");\n Strinteger xxxxx = 5;\n check(is Integer xxxxx, \"Type alias\");\n}\n","subject":"Add simple test for type alias","message":"Add simple test for type alias\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon-js,ceylon\/ceylon-js,ceylon\/ceylon-js"} {"commit":"56f20db1bb3c4744fcaf64cb83f93afd8974954e","old_file":"test-samples\/higherTypes.ceylon","new_file":"test-samples\/higherTypes.ceylon","old_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\nvalue namedArgsInvocWithFunctionArgWithTypeParam = f {\n function f(T t) {\n return t;\n }\n};\n","new_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\nvalue namedArgsInvocWithFunctionArgWithTypeParam = f {\n function f(T t) {\n return t;\n }\n};\nvalue anonymousGenericFunction = (T t) => t;\n","subject":"Add test for generic anonymous functions","message":"Add test for generic anonymous functions\n\nPart of #108.\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"c581e805b1f3ec5c1eca2a4c43e6ba741300609c","old_file":"source\/ceylon\/markdown\/html\/renderHtml.ceylon","new_file":"source\/ceylon\/markdown\/html\/renderHtml.ceylon","old_contents":"import ceylon.html {\n\tHead,\n\tBody,\n\tHtml\n}\nimport ceylon.markdown.core {\n\tDocument\n}\n\n\"Render Markdown as a complete HTML document. This method returns an [[Html]] object.\n \n value html = renderCompleteHtml(tree);\"\nshared Html renderCompleteHtml(Document document) => Html {\n\tHead { },\n\tBody {\n\t\tchildren = HtmlVisitor().visitDocument(document);\n\t}\n};\n\n\"Render Markdown as a list of HTML elements. This method returns a sequence.\n \n value nodes = renderPartialHtml(tree);\"\nshared HtmlChildren[] renderPartialHtml(Document document)\n\t\t=> HtmlVisitor().visitDocument(document);\n","new_contents":"import ceylon.html {\n\tHead,\n\tBody,\n\tHtml,\n\tMeta\n}\nimport ceylon.markdown.core {\n\tDocument\n}\n\n\"Render Markdown as a complete HTML document. This method returns an [[Html]] object\n using the `utf-8` charset.\n \n value html = renderCompleteHtml(tree);\"\nshared Html renderCompleteHtml(Document document) => Html {\n\tHead { \n\t\tMeta { charset=\"utf-8\"; }\n\t},\n\tBody {\n\t\tchildren = HtmlVisitor().visitDocument(document);\n\t}\n};\n\n\"Render Markdown as a list of HTML elements. This method returns a sequence.\n \n value nodes = renderPartialHtml(tree);\"\nshared HtmlChildren[] renderPartialHtml(Document document)\n\t\t=> HtmlVisitor().visitDocument(document);\n","subject":"Use the `utf-8` charset for html","message":"Use the `utf-8` charset for html\n","lang":"Ceylon","license":"apache-2.0","repos":"rohitmohan96\/ceylon.markdown"} {"commit":"cf9ad110bc8db4ca74edf3f0b5ed23b89b604247","old_file":"test-samples\/decLiterals.ceylon","new_file":"test-samples\/decLiterals.ceylon","old_contents":"void decLiterals() {\n value clM = `module ceylon.language`;\n value clP = `package ceylon.language`;\n value stringC = `class String`;\n value iterableI = `interface Iterable`;\n value aliasA = `alias Alias`;\n value givenG = `given Given`;\n value nullV = `value null`;\n value identityF = `function identity`;\n value newN = `new Constructor`;\n \n value currentM = `module`;\n value currentP = `package`;\n value currentC = `class`;\n value currentI = `interface`;\n}\n","new_contents":"void decLiterals() {\n value clM = `module ceylon.language`;\n value clP = `package ceylon.language`;\n value stringC = `class String`;\n value iterableI = `interface Iterable`;\n value aliasA = `alias Alias`;\n value givenG = `given Given`;\n value nullV = `value null`;\n value identityF = `function identity`;\n value newN = `new Constructor`;\n \n value currentM = `module`;\n value currentP = `package`;\n value currentC = `class`;\n value currentI = `interface`;\n}\n\nvoid decLiteralsWithoutBackticks() {\n value clM = module ceylon.language;\n value clP = package ceylon.language;\n value stringC = class String;\n value iterableI = interface Iterable;\n value aliasA = alias Alias;\n value givenG = given Given;\n value nullV = value null;\n value identityF = function identity;\n value newN = new Constructor;\n \n value currentM = module;\n value currentP = package;\n value currentC = class;\n value currentI = interface;\n}\n","subject":"Add test for backtick-less meta literals","message":"Add test for backtick-less meta literals\n\nJust copied from the existing test, with all backticks removed.\n\nPart of #143.\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.formatter"} {"commit":"53e74f8936005c169f297512ca5b97efd1261e3a","old_file":"test-samples\/higherTypes.ceylon","new_file":"test-samples\/higherTypes.ceylon","old_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\nvalue namedArgsInvocWithFunctionArgWithTypeParam = f {\n function f(T t) {\n return t;\n }\n};\nvalue anonymousGenericFunction = (T t) => t;\n","new_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\nvalue namedArgsInvocWithFunctionArgWithTypeParam = f {\n function f(T t) {\n return t;\n }\n};\nvalue anonymousGenericFunction = (T t) => t;\nclass C() {\n parameterizedExpressionWithTypeParams(T t) => t;\n}\n","subject":"Add test for parameterized exprs with type params","message":"Add test for parameterized exprs with type params\n\nAnother part of #108 that already works without having to change\nanything. Looks like ParameterizedException’s default walker order works\nfor us.\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"b61cf79d80014741f4c690c3c858204e88534b68","old_file":"source\/ceylon\/build\/engine\/console.ceylon","new_file":"source\/ceylon\/build\/engine\/console.ceylon","old_contents":"import ceylon.build.task { Goal, GoalSet }\nimport ceylon.collection { LinkedList }\n\n\n\"An interactive console.\"\nvoid console({+} goals) {\n value exitMessages = LazyMap({\n exitCodes.success->\"Success\",\n exitCodes.dependencyCycleFound->\"Dependency Cycle Found\",\n exitCodes.invalidGoalFound->\"Invalid goal found\",\n exitCodes.duplicateGoalsFound->\"Duplicate goals found\",\n exitCodes.noGoalToRun->\"No goal to run\",\n exitCodes.errorOnTaskExecution->\"Error on task execution\"\n });\n print(\"Available goals: ``mergeGoalSetsWithGoals(goals)``\");\n print(\"Enter Ctrl + D to quit\");\n while (true) {\n process.write(\"> \");\n String? rawLine = process.readLine(); \/\/ workaround for https:\/\/github.com\/ceylon\/ceylon.language\/issues\/372\n if (is Null rawLine) {\n process.writeLine();\n return;\n }\n assert(exists rawLine);\n String line = rawLine.trimmed;\n value result = runEngine(goals,\"\",line.split().sequence);\n assert(exists msg = exitMessages[result.exitCode]);\n print(msg);\n }\n}","new_contents":"import ceylon.build.task { Goal, GoalSet }\nimport ceylon.collection { HashMap }\n\n\"An interactive console.\"\nvoid console({+} goals) {\n value exitMessages = HashMap({\n exitCodes.success->\"Success\",\n exitCodes.dependencyCycleFound->\"Dependency Cycle Found\",\n exitCodes.invalidGoalFound->\"Invalid goal found\",\n exitCodes.duplicateGoalsFound->\"Duplicate goals found\",\n exitCodes.noGoalToRun->\"No goal to run\",\n exitCodes.errorOnTaskExecution->\"Error on task execution\"\n });\n print(\"Available goals: ``mergeGoalSetsWithGoals(goals)``\");\n print(\"Enter Ctrl + D to quit\");\n while (true) {\n process.write(\"> \");\n String? rawLine = process.readLine(); \/\/ workaround for https:\/\/github.com\/ceylon\/ceylon.language\/issues\/372\n if (is Null rawLine) {\n process.writeLine();\n return;\n }\n assert(exists rawLine);\n String line = rawLine.trimmed;\n value result = runEngine(goals,\"\",line.split().sequence);\n assert(exists msg = exitMessages[result.exitCode]);\n print(msg);\n }\n}","subject":"Use HashMap instead of LazyMap","message":"Use HashMap instead of LazyMap","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.build,ceylon\/ceylon.build,HenningB\/ceylon.build,HenningB\/ceylon.build"} {"commit":"9d98db5839164026cd6e14a18d82569186875f41","old_file":"src\/test\/ceylon\/conditions\/conds.ceylon","new_file":"src\/test\/ceylon\/conditions\/conds.ceylon","old_contents":"import check {...}\n\nshared void test() {\n Boolean a = true;\n Boolean b = false;\n variable value count := 0;\n if (a && b) {\n fail(\"WTF?\");\n } else if (a || b) {\n check(a||b, \"boolean 1\");\n count++;\n }\n String? c = \"X\";\n String? d = null;\n if (exists c && exists d) {\n fail(\"WTF exists\");\n } else if (exists c1=c, exists c1[0]) {\n check(c1 == \"X\", \"exists\");\n count++;\n }\n String|Integer e = 1;\n if (is Integer e && exists d) {\n fail(\"WTF is\");\n } else if (is Integer e, exists c) {\n check(e>0, \"is\");\n count++;\n }\n String[] f = {\"a\",\"b\",\"c\"};\n Integer[] g = {};\n if (nonempty f && nonempty g) {\n fail(\"WTF nonempty\");\n } else if (nonempty f, nonempty f.first) {\n check(f.first.uppercased==\"A\", \"nonempty\");\n count++;\n }\n check(count==4, \"some conditions were not met: \" count \" instead of 4\");\n results();\n}\n","new_contents":"import check {...}\n\nshared void test() {\n Boolean a = true;\n Boolean b = false;\n variable value count := 0;\n if (a && b) {\n fail(\"WTF?\");\n } else if (a || b) {\n check(a||b, \"boolean 1\");\n count++;\n }\n String? c = \"X\";\n String? d = null;\n if (exists c && exists d) {\n fail(\"WTF exists\");\n } else if (exists c1=c, exists c1[0]) {\n check(c1 == \"X\", \"exists\");\n count++;\n }\n String|Integer e = 1;\n if (is Integer e && exists d) {\n fail(\"WTF is\");\n } else if (is Integer e, exists c) {\n check(e>0, \"is\");\n count++;\n }\n String[] f = {\"a\",\"b\",\"c\"};\n Integer[] g = {};\n if (nonempty f && nonempty g) {\n fail(\"WTF nonempty\");\n } else if (nonempty f, nonempty f.first) {\n check(f.first.uppercased==\"A\", \"nonempty\");\n count++;\n }\n check(count==4, \"some conditions were not met: \" count \" instead of 4\");\n Void zz = 1;\n assert(is Integer zz2=zz, zz2 > 0);\n check(zz2==1, \"special -> boolean\");\n \/\/and now some comprehensions\n Sequence seq1 = { 1, 2, 3, null, 4, 5, null, 6, 7, null, 10};\n check({ for (i in seq1) if (exists i, i%2==0) i*10 }=={20,40,60,100},\"comprehension [1]\");\n results();\n}\n","subject":"Test condition list with comprehensions","message":"Test condition list with comprehensions\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon-js,ceylon\/ceylon-js,ceylon\/ceylon-js"} {"commit":"9fc352d38c2fa3222f146d5e306a6ee01ec81dd6","old_file":"test-samples\/higherTypes.ceylon","new_file":"test-samples\/higherTypes.ceylon","old_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\nvalue namedArgsInvocWithFunctionArgWithTypeParam = f {\n function f(T t) {\n return t;\n }\n};\nvalue anonymousGenericFunction = (T t) => t;\nclass C() {\n parameterizedExpressionWithTypeParams(T t) => t;\n}\n","new_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\nvalue namedArgsInvocWithFunctionArgWithTypeParam = f {\n function f(T t) {\n return t;\n }\n};\nvalue anonymousGenericFunction = (T t) given T satisfies Anything => t;\nclass C() {\n parameterizedExpressionWithTypeParams(T t) => t;\n}\n","subject":"Add test for anon functions with type constraints","message":"Add test for anon functions with type constraints\n\nPart of #108.\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"bcf277cb47b4ea00c43e562cf0fa3c8b6b08fffb","old_file":"test\/characters.ceylon","new_file":"test\/characters.ceylon","old_contents":"void characters() {\n value c = `a`;\n assert(c.lowercase, \"lowercase char\");\n assert(!c.uppercase, \"lowercase char\");\n assert(`A`.uppercase, \"uppercase char\");\n assert(!`A`.lowercase, \"uppercase char\");\n assert(c.uppercased==`A`, \"uppercased char\");\n assert(`A`.lowercased==`a`, \"lowercased char\");\n assert(c.string==\"a\", \"character string\");\n assert(!c.whitespace, \"character not whitespace\");\n assert(!c.digit, \"character not whitespace\");\n assert(` `.whitespace, \"character whitespace\");\n assert(`1`.digit, \"character digt\");\n assert(`a`<`z`, \"char order\");\n assert(`a`.successor==`b`, \"char successor\");\n assert(`Z`.predecessor==`Y`, \"char predecessor\");\n \n variable value i:=0;\n for (x in `a`..`z`) {\n i:=i+1;\n assert(x>=`a`&&x<=`z`, \"character range\");\n }\n assert(i==26, \"character range\"); \n \n assert(c.integer.character==c, \"integer\/character conversion\");\n assert(69.character.integer==69, \"integer\/character conversion\");\n \n}","new_contents":"void characters() {\n value c = `a`;\n assert(c.lowercase, \"lowercase char\");\n assert(!c.uppercase, \"lowercase char\");\n assert(`A`.uppercase, \"uppercase char\");\n assert(!`A`.lowercase, \"uppercase char\");\n assert(c.uppercased==`A`, \"uppercased char\");\n assert(`A`.lowercased==`a`, \"lowercased char\");\n assert(c.string==\"a\", \"character string\");\n assert(!c.whitespace, \"character not whitespace\");\n assert(!c.digit, \"character not whitespace\");\n assert(` `.whitespace, \"character whitespace\");\n assert(`1`.digit, \"character digt\");\n assert(`a`<`z`, \"char order\");\n assert(`a`.successor==`b`, \"char successor\");\n assert(`Z`.predecessor==`Y`, \"char predecessor\");\n assert(`\\t`.integer==9, \"escaped characters 1\");\n assert(`\\\\`.integer==92, \"escaped characters 2\");\n assert(`\\``.integer==96, \"escaped characters 3\");\n \n variable value i:=0;\n for (x in `a`..`z`) {\n i:=i+1;\n assert(x>=`a`&&x<=`z`, \"character range\");\n }\n assert(i==26, \"character range\"); \n \n assert(c.integer.character==c, \"integer\/character conversion\");\n assert(69.character.integer==69, \"integer\/character conversion\");\n \n}\n","subject":"Add tests for escaped character literals","message":"Add tests for escaped character literals\n","lang":"Ceylon","license":"apache-2.0","repos":"jvasileff\/ceylon.language,lucaswerkmeister\/ceylon.language,unratito\/ceylon.language,unratito\/ceylon.language,lucaswerkmeister\/ceylon.language,jvasileff\/ceylon.language,ceylon\/ceylon.language,ceylon\/ceylon.language"} {"commit":"09c6d95297271f7229acc1bb4d1ab6e31d6b2648","old_file":"source\/ceylon\/net\/http\/server\/internal\/ByteUtil.ceylon","new_file":"source\/ceylon\/net\/http\/server\/internal\/ByteUtil.ceylon","old_contents":"import java.nio {\n JByteBuffer=ByteBuffer\n}\nimport java.lang {\n ByteArray\n}\n\nshared {Byte*} toBytes(JByteBuffer[] jByteBufferArray) => \n jByteBufferArray.flatMap((JByteBuffer element) => collectBytes(element));\n\n{Byte*} collectBytes(JByteBuffer jByteBuffer) {\n ByteArray array = ByteArray(jByteBuffer.remaining()); \/\/TODO can we do without new array?\n jByteBuffer.get(array);\n return array.iterable;\n}\n\n","new_contents":"import java.nio {\n JByteBuffer=ByteBuffer\n}\nimport java.lang {\n ByteArray\n}\n\nshared {Byte*} toBytes(JByteBuffer[] jByteBufferArray) => \n jByteBufferArray.flatMap((JByteBuffer element) => collectBytes(element));\n\n{Byte*} collectBytes(JByteBuffer jByteBuffer) {\n return jByteBuffer.array().iterable;\n}\n\n","subject":"Remove creation of new array.","message":"Remove creation of new array.\n","lang":"Ceylon","license":"apache-2.0","repos":"rohitmohan96\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,matejonnet\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,ASzc\/ceylon-sdk,vietj\/ceylon-sdk,vietj\/ceylon-sdk,ASzc\/ceylon-sdk"} {"commit":"af15207ae0c301bc291c113fabc9711116990219","old_file":"samples\/no-module\/source\/noModule.ceylon","new_file":"samples\/no-module\/source\/noModule.ceylon","old_contents":"\/*\n * Copyright 2011 Red Hat Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\/\nvoid run(){\n print(\"Look, Ma! No module!\");\n}\n","new_contents":"\/*\n * Copyright 2011 Red Hat Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\/\nshared void run(){\n print(\"Look, Ma! No module!\");\n}\n","subject":"Fix for the JS backend: made run method shared","message":"Fix for the JS backend: made run method shared\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon-dist,ceylon\/ceylon-dist"} {"commit":"a829d53d78de5bf4ac8e3ed8b121d2cb8d978bde","old_file":"source\/ceylon\/promise\/Resolver.ceylon","new_file":"source\/ceylon\/promise\/Resolver.ceylon","old_contents":"\"Something that can go through a transition and is meant to \n be be fulfilled or rejected.\"\nby(\"Julien Viet\")\nshared interface Resolver {\n\n \"Fulfills the promise with a value or a promise to the \n value.\"\n shared formal void fulfill(Value|Promise val);\n \n \"Rejects the promise with a reason.\"\n shared formal void reject(Throwable reason);\n\n \"Either fulfill or reject the promise\"\n shared void resolve(Value|Promise|Throwable val) {\n if (is Value|Promise val) {\n fulfill(val);\n } else {\n assert(is Throwable val);\n reject(val);\n }\n }\n}\n","new_contents":"\"Something that can go through a transition and is meant to \n be be fulfilled or rejected.\"\nby(\"Julien Viet\")\nshared interface Resolver {\n\n \"Fulfills the promise with a value or a promise to the \n value.\"\n shared formal void fulfill(Value|Promise val);\n \n \"Rejects the promise with a reason.\"\n shared formal void reject(Throwable reason);\n\n \"Either fulfill or reject the promise\"\n shared void resolve(Value|Promise|Throwable val) {\n if (is Value|Promise val) {\n fulfill(val);\n } else {\n reject(val);\n }\n }\n}\n","subject":"Make run with latest ceylon","message":"Make run with latest ceylon\n","lang":"Ceylon","license":"apache-2.0","repos":"jeancharles-roger\/ceylon-sdk,ASzc\/ceylon-sdk,vietj\/ceylon-sdk,rohitmohan96\/ceylon-sdk,ASzc\/ceylon-sdk,jvasileff\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,vietj\/ceylon-sdk,jvasileff\/ceylon-sdk,matejonnet\/ceylon-sdk"} {"commit":"078e1b180db1a26c0024362f70924dc7da52a52d","old_file":"test\/arrays.ceylon","new_file":"test\/arrays.ceylon","old_contents":"\/\/Array tests\nvoid testArrays() {\n assert(!nonempty arrayOfNone(), \"arrayOfNone\");\n value a1 = arrayOfSome({1});\n \/\/assert(nonempty a1, \"nonempty array\");\n assert(a1.size==1, \"array.size\");\n assert(a1[0] exists, \"array[0]\");\n assert(!a1.empty, \"array.empty\");\n assert(a1.hash==1, \"array.hash\");\n a1.setItem(0,10);\n if (exists i=a1[0]) {\n assert(i==10, \"array.setItem\");\n } else { fail(\"array.setItem\"); }\n a1.setItem(0,null);\n if (exists i=a1[0]) {\n fail(\"array.setItem (null)\");\n }\n}\n","new_contents":"\/\/Array tests\nvoid testArrays() {\n assert(!nonempty array(), \"arrayOfNone\");\n value a1 = array(1);\n assert(nonempty a1, \"nonempty array\");\n assert(a1.size==1, \"array.size\");\n assert(a1[0] exists, \"array[0]\");\n assert(!a1.empty, \"array.empty\");\n assert(a1.hash==1, \"array.hash\");\n a1.setItem(0,10);\n if (exists i=a1[0]) {\n assert(i==10, \"array.setItem\");\n } else { fail(\"array.setItem\"); }\n a1.setItem(0,null);\n if (exists i=a1[0]) {\n fail(\"array.setItem (null)\");\n }\n value a2=array(1,2,3);\n value a3=arrayOfSome({1,2,3});\n assert(a2==a3, \"array.equals\");\n assert(a2.size==a3.size, \"array.size\");\n assert(nonempty a2, \"nonempty array 2\");\n a2.setItem(0,10);\n a3.setItem(0,null);\n if (exists i=a2[0]) {\n assert(i==10, \"array.setItem 2\");\n } else { fail(\"array.setItem 2\"); }\n if (exists i=a3[0]) {\n fail(\"array.setItem (null) 2\");\n }\n}\n","subject":"Complete the array tests (which now pass with flying colors)","message":"Complete the array tests (which now pass with flying colors)\n","lang":"Ceylon","license":"apache-2.0","repos":"jvasileff\/ceylon.language,jvasileff\/ceylon.language,lucaswerkmeister\/ceylon.language,unratito\/ceylon.language,unratito\/ceylon.language,ceylon\/ceylon.language,ceylon\/ceylon.language,lucaswerkmeister\/ceylon.language"} {"commit":"1b8d8898478698c83e1a5dfa0adf4e3f41deff5e","old_file":"source\/ceylon\/buffer\/module.ceylon","new_file":"source\/ceylon\/buffer\/module.ceylon","old_contents":"by (\"Stéphane Épardaud\", \"Alex Szczuczko\")\nmodule ceylon.buffer \"1.2.1\" {\n import ceylon.collection \"1.2.1\";\n native (\"jvm\") import java.base \"7\";\n native (\"jvm\") import java.tls \"7\";\n native (\"jvm\") import ceylon.interop.java \"1.2.1\";\n}\n","new_contents":"\"This module defines character sets, for encoding and decoding bytes to\n strings, as well as buffers of bytes and characters for input\/output.\"\nby (\"Stéphane Épardaud\", \"Alex Szczuczko\")\nmodule ceylon.buffer \"1.2.1\" {\n import ceylon.collection \"1.2.1\";\n native (\"jvm\") import java.base \"7\";\n native (\"jvm\") import ceylon.interop.java \"1.2.1\";\n}\n","subject":"Remove java.tls import from ceylon.buffer","message":"Remove java.tls import from ceylon.buffer\n","lang":"Ceylon","license":"apache-2.0","repos":"matejonnet\/ceylon-sdk,rohitmohan96\/ceylon-sdk,ASzc\/ceylon-sdk,ASzc\/ceylon-sdk"} {"commit":"561277a66dfa7b14b7573ce9b0d2f01c7f6cf8d3","old_file":"test-samples\/ifExpression.ceylon","new_file":"test-samples\/ifExpression.ceylon","old_contents":"Anything ifExpression =\n if (true || false)\n then 1\n else 2;\nvoid ifExpr() {\n print(if (true) then 1 else 0);\n}\n","new_contents":"Anything ifExpression =\n if (true || false)\nthen 1\nelse 2;\nvoid ifExpr() {\n print(if (true) then 1 else 0);\n}\n","subject":"Update if expressions test for changed indentation","message":"Update if expressions test for changed indentation\n\nSee 681239e and #104.\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"e75466ae2cdebd7ada5d29941a2c48ec30e488d6","old_file":"source\/ceylon\/ast\/create\/ConstructorDefinition.ceylon","new_file":"source\/ceylon\/ast\/create\/ConstructorDefinition.ceylon","old_contents":"import ceylon.ast.core {\n Annotations,\n ConstructorDefinition,\n Declaration,\n ExtendedType,\n Parameter,\n Parameters,\n Statement\n}\n\n\"\"\"Creates a constructor definition.\n \n Usage example:\n \n TODO\"\"\"\nshared ConstructorDefinition constructorDefinition(\n name,\n parameters = Parameters(),\n block = [],\n extendedType = null,\n annotations = Annotations()) {\n \n IdentifierIsh name;\n Parameters|{Parameter*} parameters;\n {Declaration|Statement*} block;\n ExtendedType? extendedType;\n Annotations annotations;\n \n return ConstructorDefinition {\n name = lidentifier(name);\n block = package.block(block);\n parameters = parameters_internal(parameters);\n extendedType = extendedType;\n annotations = annotations;\n };\n}\n","new_contents":"import ceylon.ast.core {\n Annotations,\n ConstructorDefinition,\n Declaration,\n ExtendedType,\n Parameter,\n Parameters,\n Statement\n}\n\n\"\"\"Creates a constructor definition.\n \n Usage example:\n \n constructorDefinition {\n name = \"rgb\";\n parameters = {\n ValueParameter {\n type = baseType(\"Integer\");\n name = lidentifier(\"rgb\");\n }\n };\n annotations = annotations {\n \"Constructs a color, taking the red, green, and blue values\n from the argument integer.\";\n \"shared\"\n };\n \n ValueSpecification {\n qualifier = This();\n name = lidentifier(\"rgb\");\n specifier = Specifier(baseExpression(\"rgb\"));\n }\n }\"\"\"\nshared ConstructorDefinition constructorDefinition(\n name,\n parameters = Parameters(),\n block = [],\n extendedType = null,\n annotations = Annotations()) {\n \n IdentifierIsh name;\n Parameters|{Parameter*} parameters;\n {Declaration|Statement*} block;\n ExtendedType? extendedType;\n Annotations annotations;\n \n return ConstructorDefinition {\n name = lidentifier(name);\n block = package.block(block);\n parameters = parameters_internal(parameters);\n extendedType = extendedType;\n annotations = annotations;\n };\n}\n","subject":"Add missing usage example for constructorDefinition","message":"Add missing usage example for constructorDefinition\n\nI must’ve forgotten this in 486bb73 (cc #71).\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"13cc0f4d3b8ad4c9795ca8c5c2aa419ededc56e8","old_file":"source\/ceylon\/time\/module.ceylon","new_file":"source\/ceylon\/time\/module.ceylon","old_contents":"\"Date and Time library for Ceylon language SDK.\n \n This library is loosely modeled\/inspired by the JodaTime\/JSR-310 date\/time library.\n \"\nby (\"Diego Coronel\", \"Roland Tepp\")\nmodule ceylon.time \"1.2.3\" {\n import ceylon.collection \"1.2.3\";\n}\n","new_contents":"\"Date and Time library for Ceylon language SDK.\n \n This library is loosely modeled\/inspired by the JodaTime\/JSR-310 date\/time library.\n \"\nby (\"Diego Coronel\", \"Roland Tepp\")\nmodule ceylon.time \"1.2.3\" {\n}\n","subject":"Remove unused dependency on ceylon.collection","message":"Remove unused dependency on ceylon.collection\n","lang":"Ceylon","license":"apache-2.0","repos":"rohitmohan96\/ceylon-sdk,matejonnet\/ceylon-sdk"} {"commit":"ee10a1d7571b7a5c5e1d3865ebb632a762a24317","old_file":"source\/org\/otherone\/vhostproxy\/vertx\/module.ceylon","new_file":"source\/org\/otherone\/vhostproxy\/vertx\/module.ceylon","old_contents":"native(\"jvm\") module org.otherone.vhostproxy.vertx \"4\" {\n shared import io.vertx.ceylon.core \"3.3.2\";\n \/\/shared import \"io.vertx:vertx-lang-ceylon\" \"3.3.0-SNAPSHOT\";\n \/\/shared import \"io.vertx.lang.ceylon\" \"3.3.0-SNAPSHOT\";\n import ceylon.regex \"1.2.2\";\n import ceylon.logging \"1.2.2\";\n \/\/import ceylon.time \"1.2.1\";\n import java.base \"7\";\n \/\/import \"it.zero11:acme-client\" \"0.1.2\";\n import ceylon.file \"1.2.2\";\n import ceylon.buffer \"1.2.2\";\n}\n","new_contents":"native(\"jvm\") module org.otherone.vhostproxy.vertx \"4\" {\n shared import io.vertx.ceylon.core \"3.3.3\";\n \/\/shared import \"io.vertx:vertx-lang-ceylon\" \"3.3.0-SNAPSHOT\";\n \/\/shared import \"io.vertx.lang.ceylon\" \"3.3.0-SNAPSHOT\";\n import ceylon.regex \"1.3.1\";\n import ceylon.logging \"1.3.1\";\n \/\/import ceylon.time \"1.2.1\";\n import java.base \"7\";\n \/\/import \"it.zero11:acme-client\" \"0.1.2\";\n import ceylon.file \"1.3.1\";\n import ceylon.buffer \"1.3.1\";\n}\n","subject":"Update to ceylon 1.3.1 + vertx 3.3.3","message":"Update to ceylon 1.3.1 + vertx 3.3.3\n","lang":"Ceylon","license":"apache-2.0","repos":"xkr47\/vhostproxy4"} {"commit":"fc4c19a6e485edfff8001b8f9ca0d62f0e11dea1","old_file":"source-gen\/source_gen\/ceylon\/ast\/run.ceylon","new_file":"source-gen\/source_gen\/ceylon\/ast\/run.ceylon","old_contents":"import ceylon.collection {\n MutableList,\n ArrayList\n}\n\"Run the module `source_gen.ceylon.ast`.\n \n See [this gist](https:\/\/gist.github.com\/lucaswerkmeister\/a4da0fa5d9d5b14cc3e9).\"\nshared void run() {\n if (exists first = process.arguments.first, first == \"--help\") {\n print(\"https:\/\/gist.github.com\/lucaswerkmeister\/a4da0fa5d9d5b14cc3e9\");\n return;\n }\n assert (exists type = process.arguments[0], exists superType = process.arguments[1]);\n variable Integer i = 2;\n MutableListString> params = ArrayListString>();\n while (i < process.arguments.size) {\n assert (exists paramType = process.arguments[i++]);\n assert (exists paramName = process.arguments[i++]);\n params.add(paramType->paramName);\n }\n variable String? line = process.readLine();\n StringBuilder doc = StringBuilder();\n while (exists l = line) {\n doc.append(l);\n line = process.readLine();\n }\n Generator(type, superType, params.sequence(), doc.string).run();\n}\n","new_contents":"import ceylon.collection {\n MutableList,\n ArrayList\n}\n\"Run the module `source_gen.ceylon.ast`.\n \n See [this gist](https:\/\/gist.github.com\/lucaswerkmeister\/a4da0fa5d9d5b14cc3e9).\"\nshared void run() {\n if (exists first = process.arguments.first, first == \"--help\") {\n print(\"https:\/\/gist.github.com\/lucaswerkmeister\/a4da0fa5d9d5b14cc3e9\");\n return;\n }\n assert (exists type = process.arguments[0], exists superType = process.arguments[1]);\n variable Integer i = 2;\n MutableListString> params = ArrayListString>();\n while (i < process.arguments.size) {\n assert (exists paramType = process.arguments[i++]);\n assert (exists paramName = process.arguments[i++]);\n params.add(paramType->paramName);\n }\n variable String? line = process.readLine();\n StringBuilder doc = StringBuilder();\n while (exists l = line) {\n doc.append(l);\n doc.appendNewline();\n line = process.readLine();\n }\n Generator(type, superType, params.sequence(), doc.string).run();\n}\n","subject":"Fix source-gen bug: doc would be missing line breaks","message":"Fix source-gen bug: doc would be missing line breaks\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"c2f8d8a3db949a892929fb6eca82b99f36588f01","old_file":"dbc\/source\/ceylon\/dbc\/module.ceylon","new_file":"dbc\/source\/ceylon\/dbc\/module.ceylon","old_contents":"doc \"Components for JDBC-based database connectivity.\"\nby \"Enrique Zamudio\"\nlicense \"Apache Software License 2.0\"\nmodule ceylon.dbc '0.1' {\n import ceylon.math '0.3.2';\n}\n","new_contents":"doc \"This module offers some components for JDBC-based\n database connectivity. The main component is simply\n called Sql and is meant to be used with a `DataSource`\n that has been already been configured. \"\nby \"Enrique Zamudio\"\nlicense \"Apache Software License 2.0\"\nmodule ceylon.dbc '0.1' {\n import ceylon.math '0.3.3';\n}\n","subject":"Update doc and ceylon.math version","message":"Update doc and ceylon.math version\n","lang":"Ceylon","license":"apache-2.0","repos":"rohitmohan96\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,vietj\/ceylon-sdk,vietj\/ceylon-sdk,DiegoCoronel\/ceylon-sdk,jvasileff\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,jvasileff\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,matejonnet\/ceylon-sdk,unratito\/ceylon-sdk,unratito\/ceylon-sdk,ASzc\/ceylon-sdk,DiegoCoronel\/ceylon-sdk,ASzc\/ceylon-sdk"} {"commit":"6d5f560d9bdbda4e79891f758214ada15ee77e9f","old_file":"source\/ceylon\/formatter\/module.ceylon","new_file":"source\/ceylon\/formatter\/module.ceylon","old_contents":"\"A formatter for the Ceylon programming language.\"\nby (\"Lucas Werkmeister \")\nlicense(\"http:\/\/www.apache.org\/licenses\/LICENSE-2.0.html\")\nmodule ceylon.formatter \"1.1.0\" {\n shared import java.base \"7\";\n shared import com.redhat.ceylon.typechecker \"1.1.0\";\n shared import com.redhat.ceylon.common \"1.1.0\";\n shared import ceylon.file \"1.1.0\";\n import ceylon.interop.java \"1.1.0\";\n import ceylon.collection \"1.1.0\";\n optional import ceylon.test \"1.1.0\"; \/\/ for tests only, remove for release!\n}\n","new_contents":"\"A formatter for the Ceylon programming language.\"\nby (\"Lucas Werkmeister \")\nlicense (\"http:\/\/www.apache.org\/licenses\/LICENSE-2.0.html\")\nmodule ceylon.formatter \"1.1.0\" {\n shared import java.base \"7\";\n shared import com.redhat.ceylon.typechecker \"1.1.0\";\n shared import com.redhat.ceylon.common \"1.1.0\";\n shared import ceylon.file \"1.1.0\";\n import ceylon.interop.java \"1.1.0\";\n import ceylon.collection \"1.1.0\";\n optional import ceylon.test \"1.1.0\"; \/\/ for tests only, remove for release!\n}\n","subject":"Format source code (ws in license annotation)","message":"Format source code (ws in license annotation)\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"0b8e4c5d2529d490e8e47076751c639338966f85","old_file":"source\/ceylon\/formatter\/module.ceylon","new_file":"source\/ceylon\/formatter\/module.ceylon","old_contents":"\"A formatter for the Ceylon programming language.\"\nmodule ceylon.formatter \"1.0.0\" {\n shared import java.base \"7\";\n shared import com.redhat.ceylon.typechecker \"1.0.0\";\n shared import ceylon.file \"1.0.0\";\n import ceylon.time \"1.0.0\";\n import ceylon.interop.java \"1.0.0\";\n import ceylon.collection \"1.0.0\";\n}\n","new_contents":"\"A formatter for the Ceylon programming language.\"\nmodule ceylon.formatter \"1.0.0\" {\n shared import java.base \"7\";\n shared import com.redhat.ceylon.typechecker \"1.1.0\";\n shared import ceylon.file \"1.0.0\";\n import ceylon.time \"1.0.0\";\n import ceylon.interop.java \"1.0.0\";\n import ceylon.collection \"1.0.0\";\n}\n","subject":"Update for Ceylon 1.1 (typechecker version)","message":"Update for Ceylon 1.1 (typechecker version)\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"d5dffc7905fcc110132bdff3cad589e3e2225765","old_file":"test-source\/test\/ceylon\/ast\/api\/module.ceylon","new_file":"test-source\/test\/ceylon\/ast\/api\/module.ceylon","old_contents":"\"Tests for the [[ceylon.ast module|module ceylon.ast]]\"\nby (\"Lucas Werkmeister \")\nlicense(\"http:\/\/www.apache.org\/licenses\/LICENSE-2.0.html\")\nmodule test.ceylon.ast.api \"1.1.0\" {\n shared import ceylon.test \"1.1.0\";\n import ceylon.ast.api \"1.1.0\";\n}\n","new_contents":"\"Tests for the [[ceylon.ast.api module|module ceylon.ast.api]]\"\nby (\"Lucas Werkmeister \")\nlicense(\"http:\/\/www.apache.org\/licenses\/LICENSE-2.0.html\")\nmodule test.ceylon.ast.api \"1.1.0\" {\n shared import ceylon.test \"1.1.0\";\n import ceylon.ast.api \"1.1.0\";\n}\n","subject":"Fix ceylon.ast(.api) link in test.ceylon.ast.api doc","message":"Fix ceylon.ast(.api) link in test.ceylon.ast.api doc\n\nAftermath of 408bc4a.\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"8bd66a0d0ac3dccfa82ee9c32bf187673c0f7e80","old_file":"test\/metamodel\/bug713.ceylon","new_file":"test\/metamodel\/bug713.ceylon","old_contents":"@test\nshared void bug713() {\n value t = `Array.OfSize` == `Array.OfSize`;\n}\n","new_contents":"@test\nshared void bug713() {\n value t = `Array.ofSize` == `Array.ofSize`;\n}\n","subject":"Fix a test for Array.ofSize","message":"Fix a test for Array.ofSize\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.language,unratito\/ceylon.language,ceylon\/ceylon.language,unratito\/ceylon.language"} {"commit":"e5e926ad918c35fa4594cf57b1f6f44ed0e8662a","old_file":"source\/ceylon\/ast\/create\/Parameters.ceylon","new_file":"source\/ceylon\/ast\/create\/Parameters.ceylon","old_contents":"import ceylon.ast.core {\n Parameter,\n Parameters\n}\n\n\"Converts a stream of [[parameters]] to a [[Parameters]] object.\"\nParameters parameters_internal(Parameters|{Parameter*} parameters) {\n if (is Parameters parameters) {\n return parameters;\n } else {\n assert (is {Parameter*} parameters);\n return Parameters(parameters.sequence());\n }\n}\n","new_contents":"import ceylon.ast.core {\n Parameter,\n Parameters\n}\n\n\"Converts a stream of [[parameters]] to a [[Parameters]] object.\"\nParameters parameters_internal(Parameters|{Parameter*} parameters) {\n if (is Parameters parameters) {\n return parameters;\n } else {\n assert (is {Parameter*} parameters);\n return Parameters(parameters.sequence());\n }\n}\n\n[Parameters+] parameterLists_internal({Parameters+}|Parameters|{Parameter*} parameters) {\n if (is Parameters parameters) {\n return [parameters];\n } else if (is {Parameters+} parameters) {\n assert (nonempty ret = parameters.sequence());\n return ret;\n } else {\n assert (is {Parameter*} parameters);\n return [parameters_internal(parameters)];\n }\n}\n","subject":"Add create parameter lists internal function","message":"Add create parameter lists internal function\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"3a07043186a3ec3472e3b536f7098d8b27f5d464","old_file":"source\/test\/ceylon\/ast\/redhat\/ModuleImport.ceylon","new_file":"source\/test\/ceylon\/ast\/redhat\/ModuleImport.ceylon","old_contents":"import ceylon.ast.core {\n Annotations,\n Artifact,\n Module,\n ModuleImport,\n ModuleSpecifier,\n Repository,\n StringLiteral\n}\nimport ceylon.ast.redhat {\n RedHatTransformer,\n moduleImportToCeylon,\n parseModuleImport\n}\nimport com.redhat.ceylon.compiler.typechecker.tree {\n Tree {\n JImportModule=ImportModule\n }\n}\n\nshared object moduleImport satisfies ConcreteTest {\n \n String->ModuleImport construct(String->Module|ModuleSpecifier name, String->StringLiteral version, String->Annotations annotations = package.annotations.emptyAnnotations)\n => \"``annotations.key`` import ``name.key`` ``version.key``;\" -> ModuleImport(name.item, version.item, annotations.item);\n \n shared String->ModuleImport ceylonAstCore100ModuleImport = construct(fullPackageName.ceylonAstCorePackageName, stringLiteral._100VersionStringLiteral, annotations.sharedAnnotations);\n shared String->ModuleImport mavenCommonsCodecModuleImport = construct(moduleSpecifier.mavenCommonsCodecModuleSpecifier, stringLiteral._14VersionStringLiteral, annotations.emptyAnnotations);\n \n parse = parseModuleImport;\n fromCeylon = RedHatTransformer.transformModuleImport;\n toCeylon = moduleImportToCeylon;\n codes = [ceylonAstCore100ModuleImport, mavenCommonsCodecModuleImport];\n}\n","new_contents":"import ceylon.ast.core {\n Annotations,\n Module,\n ModuleImport,\n ModuleSpecifier,\n StringLiteral\n}\nimport ceylon.ast.redhat {\n RedHatTransformer,\n moduleImportToCeylon,\n parseModuleImport\n}\nimport com.redhat.ceylon.compiler.typechecker.tree {\n Tree {\n JImportModule=ImportModule\n }\n}\n\nshared object moduleImport satisfies ConcreteTest {\n \n String->ModuleImport construct(String->Module|ModuleSpecifier name, String->StringLiteral version, String->Annotations annotations = package.annotations.emptyAnnotations)\n => \"``annotations.key`` import ``name.key`` ``version.key``;\" -> ModuleImport(name.item, version.item, annotations.item);\n \n shared String->ModuleImport ceylonAstCore100ModuleImport = construct(fullPackageName.ceylonAstCorePackageName, stringLiteral._100VersionStringLiteral, annotations.sharedAnnotations);\n shared String->ModuleImport mavenCommonsCodecModuleImport = construct(moduleSpecifier.mavenCommonsCodecModuleSpecifier, stringLiteral._14VersionStringLiteral, annotations.emptyAnnotations);\n \n parse = parseModuleImport;\n fromCeylon = RedHatTransformer.transformModuleImport;\n toCeylon = moduleImportToCeylon;\n codes = [ceylonAstCore100ModuleImport, mavenCommonsCodecModuleImport];\n}\n","subject":"Remove unused imports in tests","message":"Remove unused imports in tests\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"b1d0c8be70e65de9d6363300a39447685e2a0067","old_file":"source\/test\/ceylon\/ast\/create\/PositionalArguments.ceylon","new_file":"source\/test\/ceylon\/ast\/create\/PositionalArguments.ceylon","old_contents":"import ceylon.ast.core {\n thisInstance,\n ArgumentList,\n PositionalArguments,\n SpreadArgument\n}\nimport ceylon.ast.create {\n createBaseExpression=baseExpression,\n createPositionalArguments=positionalArguments\n}\nimport ceylon.test {\n test,\n assertEquals\n}\n\ntest\nshared void positionalArgumentsFunction() {\n assertEquals {\n actual = createPositionalArguments();\n expected = PositionalArguments(ArgumentList());\n };\n assertEquals {\n actual = createPositionalArguments(thisInstance, SpreadArgument(createBaseExpression(\"others\")));\n expected = PositionalArguments(ArgumentList([thisInstance], SpreadArgument(createBaseExpression(\"others\"))));\n };\n}\n","new_contents":"import ceylon.ast.core {\n thisInstance,\n ArgumentList,\n PositionalArguments,\n SpreadArgument\n}\nimport ceylon.ast.create {\n createBaseExpression=baseExpression,\n createPositionalArguments=positionalArguments\n}\nimport ceylon.test {\n test,\n assertEquals\n}\n\ntest\nshared void positionalArguments() {\n assertEquals {\n actual = createPositionalArguments();\n expected = PositionalArguments(ArgumentList());\n };\n assertEquals {\n actual = createPositionalArguments(thisInstance, SpreadArgument(createBaseExpression(\"others\")));\n expected = PositionalArguments(ArgumentList([thisInstance], SpreadArgument(createBaseExpression(\"others\"))));\n };\n}\n","subject":"Fix name of create positional arguments test","message":"Fix name of create positional arguments test\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"6ae874fbbb1684c9387aeb6862cddcb7e048a0dc","old_file":"src\/ceylon\/language\/module.ceylon","new_file":"src\/ceylon\/language\/module.ceylon","old_contents":"\"The Ceylon language module containing the core definitions \n referred to by the [language specification][spec], along \n with some basic functionality of use to most programs:\n \n - The [[root package|package ceylon.language]] defines \n general-purpose functionality including support for \n [[numbers|Numeric]] and [[character strings|String]], \n [[streams|Iterable]] and [[sequences|Sequential]], \n [[exceptions|Throwable]], and [[null values|Null]].\n - The Ceylon _metamodel_ is defined in \n [[package ceylon.language.meta]] and its subpackages \n [[package ceylon.language.meta.model]] and \n [[package ceylon.language.meta.declaration]], which\n define interfaces for interacting with applied types and \n unapplied type declarations respectively.\n \n This module defines an abstraction over the basic \n facilities of the Java or JavaScript virtual machine, \n containing only functionality that can be easily \n implemented on both platforms. Thus, certain functionality, \n for example, concurrency, for which there is no common\n virtual machine-agnostic model, is not covered by the\n langauge module.\n \n The language module is an implicit dependency of every\n other Ceylon module, and may not be explicitly imported.\n \n [spec]: http:\/\/ceylon-lang.org\/documentation\/current\/spec\"\nby (\"Gavin King\", \"Tom Bentley\", \"Tako Schotanus\",\n \"Stephane Epardaud\", \"Enrique Zamudio\")\nlicense (\"http:\/\/www.apache.org\/licenses\/LICENSE-2.0.html\")\nmodule ceylon.language \"1.1.0\" {}\n","new_contents":"\"The Ceylon language module containing the core definitions \n referred to by the [language specification][spec], along \n with some basic functionality of use to most programs:\n \n - The [[root package|package ceylon.language]] defines \n general-purpose functionality including support for \n [[numbers|Numeric]] and [[character strings|String]], \n [[streams|Iterable]] and [[sequences|Sequential]], \n [[exceptions|Throwable]], and [[null values|Null]].\n - The Ceylon _metamodel_ is defined in \n [[package ceylon.language.meta]] and its subpackages \n [[package ceylon.language.meta.model]] and \n [[package ceylon.language.meta.declaration]], which\n define interfaces for interacting with applied types and \n unapplied type declarations respectively.\n \n This module defines an abstraction over the basic \n facilities of the Java or JavaScript virtual machine, \n containing only functionality that can be easily \n implemented on both platforms. Thus, certain functionality, \n for example, concurrency, for which there is no common\n virtual machine-agnostic model, is not covered by the\n language module.\n \n The language module is an implicit dependency of every\n other Ceylon module, and may not be explicitly imported.\n \n [spec]: http:\/\/ceylon-lang.org\/documentation\/current\/spec\"\nby (\"Gavin King\", \"Tom Bentley\", \"Tako Schotanus\",\n \"Stephane Epardaud\", \"Enrique Zamudio\")\nlicense (\"http:\/\/www.apache.org\/licenses\/LICENSE-2.0.html\")\nmodule ceylon.language \"1.1.0\" {}\n","subject":"Fix doc typo: langauge -> language","message":"Fix doc typo: langauge -> language","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.language,lucaswerkmeister\/ceylon.language,jvasileff\/ceylon.language,unratito\/ceylon.language,lucaswerkmeister\/ceylon.language,unratito\/ceylon.language,jvasileff\/ceylon.language,ceylon\/ceylon.language"} {"commit":"c361370c363f5db5db6bcec1f488c724c372990e","old_file":"source\/ceylon\/ast\/core\/extraInfo.ceylon","new_file":"source\/ceylon\/ast\/core\/extraInfo.ceylon","old_contents":"import ceylon.language.meta.declaration {\n AnnotatedDeclaration\n}\n\n\"A key by which a [[Node]]’s additional information\n can be accessed.\"\nshared class Key(name)\n given Type satisfies Object {\n \"The name of this key. To avoid collisions\n with other keys, some use-site ID should be\n included, e. g. the name of the module that\n uses this key.\"\n see (`class ScopedKey`)\n String name;\n \"A unique ID of this key, composed of\n the [[name]] argument and the [[Type]] type argument.\"\n shared String id = \"`` `Type`.string ``:::``name``\";\n string => id;\n shared actual Boolean equals(Object that) {\n if (is Key that) {\n return id == that.id;\n } else {\n return false;\n }\n }\n hash => id.hash;\n}\n\n\"A [[Key]] with an explicitly provided scope, to avoid name collisions.\"\nshared class ScopedKey(scope, name)\n extends Key(\"``scope.string``:::``name.string``\")\n given Type satisfies Object {\n \"The scope of this key, that is, the declaration\n of the program element that uses it.\n \n Most commonly the declaration of the enclosing\n class, package or module.\"\n AnnotatedDeclaration scope;\n \"The name of this key.\n \n Unlike [[Key.name]], this name shouldn’t include some\n use-site ID, because that’s already provided by [[scope]].\"\n String name;\n}\n","new_contents":"import ceylon.language.meta.declaration {\n AnnotatedDeclaration\n}\n\n\"A key by which a [[Node]]’s additional information\n can be accessed.\"\nshared class Key(name)\n given Type satisfies Object {\n \"The name of this key. To avoid collisions\n with other keys, some use-site ID should be\n included, e. g. the name of the module that\n uses this key.\"\n see (`class ScopedKey`)\n String name;\n \"A unique ID of this key, composed of\n the [[name]] argument and the [[Type]] type argument.\"\n shared String id = \"`` `Type`.string ``:::``name``\";\n string => id;\n shared actual Boolean equals(Object that) {\n if (is Key that) {\n return id == that.id;\n } else {\n return false;\n }\n }\n hash => id.hash;\n}\n\n\"A [[Key]] with an explicitly provided scope, to avoid name collisions.\n \n Usage example:\n \n shared Key tokensKey\n = ScopedKey(`class CeylonParser`, \\\"tokens\\\");\"\nshared class ScopedKey(scope, name)\n extends Key(\"``scope.string``:::``name.string``\")\n given Type satisfies Object {\n \"The scope of this key, that is, the declaration\n of the program element that uses it.\n \n Most commonly the declaration of the enclosing\n class, package or module.\"\n AnnotatedDeclaration scope;\n \"The name of this key.\n \n Unlike [[Key.name]], this name shouldn’t include some\n use-site ID, because that’s already provided by [[scope]].\"\n String name;\n}\n","subject":"Add usage example to ScopedKey documentation","message":"Add usage example to ScopedKey documentation\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"955079954a17d1c13100f212ccbd3f215d805ce4","old_file":"test-samples\/higherTypes.ceylon","new_file":"test-samples\/higherTypes.ceylon","old_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\n","new_contents":"interface SecondOrder\n given Box {\n shared formal Box createBox(Float float);\n}\nvoid takesCallableParamWithTypeParam(T f(T t)) {}\n","subject":"Add test for callable parameters with type parameters","message":"Add test for callable parameters with type parameters\n\nThis part of #108 actually already works, since parameters don’t have\ntheir own node type: They’re AttributeDeclarations or\nMethodDeclarations, and MethodDeclarations of course already support\ntype parameters.\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"} {"commit":"feae339ecf52485daed955344cd46c7058f5cd29","old_file":"source\/ceylon\/io\/stdio.ceylon","new_file":"source\/ceylon\/io\/stdio.ceylon","old_contents":"import ceylon.io.impl {\n InputStreamAdapter,\n OutputStreamAdapter\n}\n\nimport java.lang {\n System {\n javaIn=\\iin,\n javaOut=\\iout,\n javaErr=err\n }\n}\n\n\"A [[ReadableFileDescriptor]] for the virtual machine's standard input\"\nReadableFileDescriptor stdin = InputStreamAdapter(javaIn);\n\n\"A [[WritableFileDescriptor]] for the virtual machine's standard output stream.\"\nWritableFileDescriptor stdout = OutputStreamAdapter(javaOut);\n\n\"A [[WritableFileDescriptor]] for the virtual machine's standard error stream.\"\nWritableFileDescriptor stderr = OutputStreamAdapter(javaErr);\n","new_contents":"import ceylon.io.impl {\n InputStreamAdapter,\n OutputStreamAdapter\n}\n\nimport java.lang {\n System {\n javaIn=\\iin,\n javaOut=\\iout,\n javaErr=err\n }\n}\n\n\"A [[ReadableFileDescriptor]] for the virtual machine's standard input stream.\"\nReadableFileDescriptor stdin = InputStreamAdapter(javaIn);\n\n\"A [[WritableFileDescriptor]] for the virtual machine's standard output stream.\"\nWritableFileDescriptor stdout = OutputStreamAdapter(javaOut);\n\n\"A [[WritableFileDescriptor]] for the virtual machine's standard error stream.\"\nWritableFileDescriptor stderr = OutputStreamAdapter(javaErr);\n","subject":"Fix typo in doc text","message":"Fix typo in doc text\n","lang":"Ceylon","license":"apache-2.0","repos":"ASzc\/ceylon-sdk,rohitmohan96\/ceylon-sdk,ASzc\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,matejonnet\/ceylon-sdk"} {"commit":"bcd50d175d7cf50c9d7baa53863aeeb0bdf160f7","old_file":"source\/ceylon\/ast\/redhat\/Type.ceylon","new_file":"source\/ceylon\/ast\/redhat\/Type.ceylon","old_contents":"import ceylon.ast.api {\n Type\n}\nimport com.redhat.ceylon.compiler.typechecker.tree {\n Tree {\n JGroupedType=GroupedType,\n JSimpleType=SimpleType,\n JStaticType=StaticType\n }\n}\nimport ceylon.ast.redhat {\n groupedTypeToCeylon,\n createParser,\n simpleTypeToCeylon\n}\n\n\"Converts a RedHat AST [[StaticType|JStaticType]] to a `ceylon.ast` [[Type]].\"\nshared Type typeToCeylon(JStaticType type) {\n switch (type)\n case (is JSimpleType) { return simpleTypeToCeylon(type); }\n case (is JGroupedType) { return groupedTypeToCeylon(type); }\n else {\n throw Error(\"Not yet implemented!\"); \/\/ TODO\n }\n}\n\n\"Compiles the given [[code]] for a Type\n into a [[Type]] using the Ceylon compiler\n (more specifically, the rule for a `type`).\"\nshared Type? compileType(String code) {\n if (exists jType = createParser(code).type()) {\n return typeToCeylon(jType);\n } else {\n return null;\n }\n}\n","new_contents":"import ceylon.ast.api {\n Type\n}\nimport com.redhat.ceylon.compiler.typechecker.tree {\n Tree {\n JGroupedType=GroupedType,\n JIterableType=IterableType,\n JOptionalType=OptionalType,\n JSequenceType=SequenceType,\n JSimpleType=SimpleType,\n JStaticType=StaticType,\n JTupleType=TupleType\n }\n}\nimport ceylon.ast.redhat {\n groupedTypeToCeylon,\n createParser,\n simpleTypeToCeylon\n}\n\n\"Converts a RedHat AST [[StaticType|JStaticType]] to a `ceylon.ast` [[Type]].\"\nshared Type typeToCeylon(JStaticType type) {\n switch (type)\n case (is JSimpleType) { return simpleTypeToCeylon(type); }\n case (is JTupleType) { return tupleTypeToCeylon(type); }\n case (is JIterableType) { return iterableTypeToCeylon(type); }\n case (is JGroupedType) { return groupedTypeToCeylon(type); }\n case (is JOptionalType) { return optionalTypeToCeylon(type); }\n case (is JSequenceType) { return sequentialTypeToCeylon(type); }\n else {\n throw Error(\"Not yet implemented!\"); \/\/ TODO\n }\n}\n\n\"Compiles the given [[code]] for a Type\n into a [[Type]] using the Ceylon compiler\n (more specifically, the rule for a `type`).\"\nshared Type? compileType(String code) {\n if (exists jType = createParser(code).type()) {\n return typeToCeylon(jType);\n } else {\n return null;\n }\n}\n","subject":"Add missing switch type cases to typeToCeylon","message":"Add missing switch type cases to typeToCeylon\n","lang":"Ceylon","license":"apache-2.0","repos":"ceylon\/ceylon.ast"} {"commit":"7977139d2386ec834e5b0ed689fe3ed906a9d075","old_file":"file\/source\/ceylon\/file\/internal\/ConcreteDirectory.ceylon","new_file":"file\/source\/ceylon\/file\/internal\/ConcreteDirectory.ceylon","old_contents":"import ceylon.file { ... }\n\nimport java.nio.file { JPath=Path, \n Files { movePath=move, \n newDirectoryStream } }\n\nclass ConcreteDirectory(JPath jpath)\n extends ConcreteExistingResource(jpath) \n satisfies Directory {\n shared actual Iterable childPaths(String filter) {\n \/\/TODO: efficient impl\n value sb = SequenceBuilder();\n value stream = newDirectoryStream(jpath, filter);\n value iter = stream.iterator();\n while (iter.hasNext()) {\n sb.append(ConcretePath(iter.next()));\n }\n stream.close();\n return sb.sequence;\n }\n shared actual Iterable children(String filter) {\n return elements { for (p in childPaths(filter)) \n if (is ExistingResource r=p.resource) r };\n }\n shared actual Iterable files(String filter) {\n return elements { for (p in childPaths(filter))\n if (is File r=p.resource) r };\n }\n shared actual Iterable childDirectories(String filter) {\n return elements { for (p in childPaths(filter))\n if (is Directory r=p.resource) r };\n }\n shared actual Resource childResource(Path|String subpath) {\n return path.childPath(subpath).resource;\n }\n shared actual Directory move(Nil target) {\n return ConcreteDirectory( movePath(jpath, asJPath(target.path)) );\n }\n}","new_contents":"import ceylon.file { ... }\n\nimport java.nio.file { JPath=Path, \n Files { movePath=move, \n newDirectoryStream } }\n\nclass ConcreteDirectory(JPath jpath)\n extends ConcreteExistingResource(jpath) \n satisfies Directory {\n shared actual Iterable childPaths(String filter) {\n \/\/TODO: efficient impl\n value sb = SequenceBuilder();\n value stream = newDirectoryStream(jpath, filter);\n value iter = stream.iterator();\n while (iter.hasNext()) {\n sb.append(ConcretePath(iter.next()));\n }\n stream.close();\n return sb.sequence;\n }\n shared actual Iterable children(String filter) {\n return elements { {for (p in childPaths(filter)) \n if (is ExistingResource r=p.resource) r}... };\n }\n shared actual Iterable files(String filter) {\n return elements { {for (p in childPaths(filter))\n if (is File r=p.resource) r}... };\n }\n shared actual Iterable childDirectories(String filter) {\n return elements { {for (p in childPaths(filter))\n if (is Directory r=p.resource) r}... };\n }\n shared actual Resource childResource(Path|String subpath) {\n return path.childPath(subpath).resource;\n }\n shared actual Directory move(Nil target) {\n return ConcreteDirectory( movePath(jpath, asJPath(target.path)) );\n }\n}","subject":"Fix for sequenced args and iterables","message":"Fix for sequenced args and iterables\n","lang":"Ceylon","license":"apache-2.0","repos":"DiegoCoronel\/ceylon-sdk,ASzc\/ceylon-sdk,matejonnet\/ceylon-sdk,unratito\/ceylon-sdk,DiegoCoronel\/ceylon-sdk,vietj\/ceylon-sdk,vietj\/ceylon-sdk,jvasileff\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,jeancharles-roger\/ceylon-sdk,rohitmohan96\/ceylon-sdk,ASzc\/ceylon-sdk,jvasileff\/ceylon-sdk,lucaswerkmeister\/ceylon-sdk,unratito\/ceylon-sdk"} {"commit":"38a48766070df0f22931642aa9d6ad2f29f5b4b4","old_file":"test-source\/test\/ceylon\/formatter\/testDumbLineBreaks.ceylon","new_file":"test-source\/test\/ceylon\/formatter\/testDumbLineBreaks.ceylon","old_contents":"","new_contents":"import ceylon.test { test }\nimport ceylon.formatter { FormattingWriter, maxDesire }\nimport ceylon.formatter.options { parseLineBreakStrategy, FormattingOptions, LineBreakStrategy }\nimport ceylon.file { Writer }\n\ntest\nshared void testDumbLineBreaks() {\n object writer satisfies Writer {\n shared actual void destroy() {} \n shared actual void flush() {} \n shared actual void write(String string) {} \n shared actual void writeLine(String line) {}\n }\n FormattingWriter w = FormattingWriter(null, writer, FormattingOptions());\n \n LineBreakStrategy? dumbLineBreaks = parseLineBreakStrategy(\"dumb\");\n assert (exists dumbLineBreaks);\n \n assert(exists location1 = dumbLineBreaks.lineBreakLocation([\n w.Token(\"breakHere\", false, 1, maxDesire, maxDesire),\n *{\n for (i in 1..10)\n w.Token(\"noBreakHere``i``\", true, null, maxDesire, maxDesire)\n }], 0, 20), location1 == 1);\n \n assert(is Null n = dumbLineBreaks.lineBreakLocation([\n for (i in 1..10)\n w.Token(\"noBreakHere``i``\", false, null, maxDesire, maxDesire)\n ], 0, 20));\n \n SequenceBuilder s = SequenceBuilder();\n for (i in 1..10) {\n s.append(w.Token(\"noBreakHere``i``\", false, null, maxDesire, maxDesire));\n }\n s.append(w.LineBreak());\n assert(exists location2 = dumbLineBreaks.lineBreakLocation(s.sequence, 0, 20), location2 == 10);\n}","subject":"Add a test for DumbLineBreaks","message":"Add a test for DumbLineBreaks\n","lang":"Ceylon","license":"apache-2.0","repos":"HenningB\/ceylon.formatter"}