Gustavo Saiani
2a58c2040e
Remove duplicated assertion and improve formatting in KernelTest ( #5454 )
2016-11-16 16:57:14 +01:00
Gustavo Saiani
9ad8441da2
Remove double space from KernelTest ( #5451 )
2016-11-16 00:32:18 +01:00
Andrea Leopardi
c08bf1ae5a
Fix the spec and guards for Inspect.Algebra.surround_many/6 ( #5450 )
...
The old spec said that the "left", "right", and "separator" arguments
had to be binaries but they can instead be documents.
2016-11-15 17:48:34 +01:00
Louis Pilfold
0508a8eef0
Syntax highlighting of IEx results ( #5355 )
2016-11-15 12:11:13 +01:00
Gustavo Saiani
d71a1d21e7
Inline do in def sequence for KernelTest
2016-11-14 17:41:02 -02:00
José Valim
b7dccb1b38
Support match lookups in the registry
2016-11-11 18:22:34 +01:00
José Valim
5845d67b89
Remove liveness guarantees as races exist anyway
2016-11-11 17:10:19 +01:00
Aleksei Magusev
01fa419f01
Minor improvements around OptionParser.to_argv/2
2016-11-09 20:43:02 +01:00
Aleksei Magusev
7c39353649
Tidy up Kernel.TypespecTest
2016-11-09 20:27:05 +01:00
Waldemar Rachwał
8e02af2752
Two fixes in record/1 ( #5412 )
...
* Document use of `record/1` with atom argument.
* In `record/1` used with record argument, raise ArgumentError on record size mismatch.
2016-11-08 15:27:46 +01:00
José Valim
5a44b36f80
Allow "super" types in Calendar functions
2016-11-08 11:52:03 +01:00
Michał Muskała
28ef5c9133
Simplify Kernel.match?/2 ( #5429 )
...
There's no need for a special handling of the underscore as the pattern,
the case expression is able of optimizing such cases too.
Additionally the right was never evaluated with underscore as the
pattern, which could lead to subtle bugs.
Currently match?(_, foo) will emit a pattern warning since both branches
of the case are exactly the same. This means such expressions had to be
removed from the test suite. They were replaced with the equivalent:
fn _ -> true end
2016-11-08 01:07:09 +01:00
Michał Muskała
252ff2e4a5
Make tokenizer recognize VC merge conflict marker ( #5416 )
...
The "<<<<<<<" is used by all major VC systems including git,
subversion and mercurial.
2016-11-06 17:55:59 +01:00
Joao Bernardo
0b13a99870
Implements Date.day_of_week/1 ( #5404 )
2016-11-03 15:32:59 +01:00
Michał Muskała
10b63eb8af
Use Macro.to_string/1 when printing bad struct keys ( #5403 )
2016-11-03 12:25:18 +01:00
Muaaz Saleem
26af1f7d72
Fixing :count support in OptionParser.to_argv ( #5394 )
2016-11-02 11:46:29 +01:00
José Valim
e9dc48f89f
Add Registry
2016-11-02 10:11:51 +01:00
José Valim
c346bb0d81
Introduce Task.async_stream/3 and Task.async_stream/5 ( #5367 )
2016-10-31 22:23:41 +01:00
Eksperimental
c643172a87
Spell "builtin" as "built-in" ( #5376 )
2016-10-29 16:19:24 +02:00
José Valim
d715f8dca8
Ensure we check for microseconds in Time.compare
2016-10-28 21:15:31 +02:00
Eksperimental
46fa15b688
Improve Typespecs page and test every document type ( #5362 )
2016-10-28 21:11:09 +02:00
Eksperimental
4a5b49fe6b
Properly spell UTF-8 ( #5373 )
2016-10-28 21:09:23 +02:00
Eksperimental
d8494a1171
Remove spaces around * in bit syntax in Macro.to_string/2 ( #5370 )
...
Per discussion in https://github.com/elixir-lang/elixir/pull/5362#discussion_r85313529 .
2016-10-28 16:10:17 +02:00
Aleksei Magusev
ab6ac8b11a
Improve names of String tests
2016-10-27 18:46:46 +02:00
José Valim
a00ed39f8a
Ensure both inner and outer transform streams are closed
2016-10-27 18:30:59 +02:00
José Valim
d8cbdf730e
Refactor Task tests to use describe/2
2016-10-27 17:01:00 +02:00
Aleksei Magusev
e909f89381
Generalize and move myers_difference/2 to List
2016-10-26 16:03:04 +02:00
Aleksei Magusev
e0d4948e7c
Favor struct update over Map.put/3 in Calendar tests
2016-10-25 20:50:53 +02:00
Aleksei Magusev
119aafc96f
Improve varible names in NaiveDateTime tests
2016-10-25 20:50:53 +02:00
Aleksei Magusev
cff98b1877
Use sigils in {Date, DateTime, NaiveDateTime}.compare/2 tests
2016-10-25 20:50:53 +02:00
Aleksei Magusev
f14fcf0a66
Put expected result on right side of assertion in Calendar tests
2016-10-25 20:50:53 +02:00
Otto Lin
82a4725b7f
Add Date/Time/NaiveDateTime.compare/2 ( #5349 )
2016-10-24 08:55:44 +02:00
José Valim
3b08987dfd
Ensure we consistently wrap variables in quotes
2016-10-22 22:25:18 +02:00
Aleksei Magusev
541f3a0114
Restructure doc samples in DocsTest
2016-10-22 21:12:09 +02:00
Aleksei Magusev
73ce33f186
Test all available doc kinds in the test for Code.get_docs/2
2016-10-22 20:53:37 +02:00
Aleksei Magusev
ba7477187a
Fully validate the shape of the options for import/2
2016-10-22 20:53:34 +02:00
Aleksei Magusev
550df181c5
Favor ==/2 operator over match in assertions
2016-10-22 20:50:19 +02:00
Aleksei Magusev
f388f96075
Make actual testing of doc attributes instead of occasional matching
2016-10-22 20:50:19 +02:00
Eksperimental
15adf9b362
File.rmdir!/1: give a less confusing error message when directory is not empty ( #5299 )
2016-10-14 11:39:55 +02:00
Eksperimental
8f315506cf
Enforce rule of only guards should start with "is_" ( #5300 )
2016-10-13 10:05:38 +02:00
Eksperimental
8771d0323b
Reword "pseudo-variables" with "compilation environment macros" ( #5308 )
...
As discussed in https://github.com/elixir-lang/elixir/pull/5301#pullrequestreview-3711427 .
2016-10-12 00:49:47 +02:00
Aleksei Magusev
1607688832
Add test for unused var warning when defined inside case/2 (and similar)
...
07f132e074 commit has brought this warning and fixed #5024 issue.
2016-10-10 23:39:24 +02:00
Aleksei Magusev
db5ba60054
Enhance Dialyzer test for and/2 and or/2 expansion
2016-10-09 16:49:15 +02:00
Aleksei Magusev
d4fcca719c
Suppress unused variable warning in Kernel.FnTest
2016-10-09 12:40:32 +02:00
Aleksei Magusev
cbe88df711
Simplify assertion formatting in Kernel.FnTest
2016-10-09 12:38:34 +02:00
Aleksei Magusev
324eea8583
Merge pull request #5295 from lexmag/new-and
...
Compile or/2 and and/2 to case/2 when in non-guard context
2016-10-09 11:02:31 +02:00
Aleksei Magusev
4a781e6797
Add Dialyzer test for and/2 and or/2 expansion
2016-10-08 23:38:23 +02:00
Aleksei Magusev
3bcaf5b901
Add test for variable usage during in/2 expansion
2016-10-08 22:54:19 +02:00
José Valim
f51db25de2
Introduce Float.ratio/1 and fix Float.{ceil/2, floor/2, round/2}
...
The previous implementations for ceil, floor and round were
not formalized and were likely prone to multiple roundings
as we performed multiplication and division by a power of
10 on the given float.
The new implementation correctly converts the float to an
exact integer representation and perform all operations using
arbitrary precision integers. The only float operation occurs
when converting the ratio back to a float.
The current implementation is more expensive due to its reliance
on big integers. Faster implementations are available in literature
where the latest one seems to be Errol:
https://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf
This change also introduces Float.ratio/1 which receives a
float and returns a pair of integers whose ratio is exactly equal
to the original float and with a positive denominator.
Closes #3400
2016-10-07 18:46:33 +02:00
Aleksei Magusev
ed3cc9d188
Expand in/2 test samples only once
2016-10-07 01:29:20 +02:00