Comments (7)
I wrote this last night to create a specs from x-common.
@cases = [cases, from, x-common]
File.open("spec.cr", "w+") do |f|
@cases.each do |c|
f.puts %/it "#{c[:description]}" do/
f.puts %/ Series.new("#{c[:digits]}").largest_product(#{c[:span]}).should eq #{c[:expected]}/
f.puts "end"
end
end
from crystal.
@elorest , Nice! Something like this could probably be expanded to make specs for every exercise's json file in the x-common repo.
from crystal.
My thoughts as well. I'll work on that when I have a chance. I just put in
2 weeks at my work so I'm swamped trying to finish up a million things so
I don't leave them in a pinch.
On Jul 21, 2016 9:48 PM, "Max Helmetag" [email protected] wrote:
@elorest https://github.com/elorest , something like this could
probably be expanded to make specs for every exercise's json file in the
x-common repo.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#20 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHmpHBp1W7JA9KM5RxPpJRoDyeusN1Rks5qYD2OgaJpZM4JRfqe
.
from crystal.
Looks like xruby
also uses some kind of common generator. We can follow the same architecture as described in xruby's generated section.
from crystal.
I feel like the test metadata (json files) in x-common
need to be standardized with description, input and expected. Currently there are some files that are kind of all over the place... but I am making some progress with a generator that pulls directly from the github repo online.
from crystal.
Yeah, we haven't really figured out what to standardize on, and any thoughts about how to do that are very welcome. If you have thoughts about it, would you mind opening something in the x-common repository?
I am making some progress with a generator that pulls directly from the github repo online.
Sweet! There's some talk about improving the Ruby generators, too. exercism/ruby#396 (comment) If several people are thinking about this at once, it could be worth starting a discussion in the github.com/exercism/discussions/issues repo.
from crystal.
@bmulvihill has ported over a spec generator similar to the one in xruby
from crystal.
Related Issues (20)
- consider making each exercise's test generator its own binary instead of all in one generator binary
- Rewrite the generator
- Add docs for the new generator
- Impliment the new generator
- Add tests for the new generator
- Add support for additonal_config.json for the generator
- Update the ci for the new generator
- Make a generator in liquid
- Seperate Ci tests
- [Concept]: Add Basic
- [Concepts]: Add Bools
- [Concepts]: Add numbers
- [Concepts]: Add number types
- [Concepts]: Add classes
- [Concepts]: Add strings
- [Concepts]: Add string-methods
- [Concepts]: Add conditionals
- [Concepts]: Add Ternary Operator
- [Concepts]: Add while loops
- [Templates]: Use standard-libary methods HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crystal.