examples: fix remaining examples and add them to CI
parent
9aa9ea7e2e
commit
7496c1be2a
|
@ -104,6 +104,8 @@ jobs:
|
|||
run: ./v symlink && v -o v2 cmd/v
|
||||
- name: Fixed tests
|
||||
run: ./v test-fixed
|
||||
- name: Build examples
|
||||
run: ./v build-examples
|
||||
# - name: Test vsh
|
||||
# run: ./v examples/v_script.vsh
|
||||
## - name: Test vid
|
||||
|
|
|
@ -233,7 +233,7 @@ pub fn v_build_failing_skipped(zargs string, folder string, skipped []string) bo
|
|||
mut mains := []string{}
|
||||
for f in files {
|
||||
if !f.contains('modules') && !f.contains('preludes') {
|
||||
if f.contains('/vweb/') || f.contains('/pg/') || f.contains('rune.v') {
|
||||
if f.contains('/vweb/') || f.contains('/pg/') || f.contains('rune.v') || f.contains('/pico') {
|
||||
continue
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,8 @@ fn print_automaton(a &automaton.Automaton){
|
|||
for x := 1; x<a.field.maxx; x++ {
|
||||
cell := a.field.get(x,y)
|
||||
if cell == 1 {
|
||||
graphics.draw_rect( square_size*x, square_size*y, square_size, square_size, filled_color )
|
||||
graphics.draw_rect(f32(square_size*x), f32(square_size*y), f32(square_size),
|
||||
f32(square_size), filled_color)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ fn main() {
|
|||
|
||||
[live]
|
||||
fn (ctx &Context) draw() {
|
||||
center := f64(size / 2)
|
||||
center := f32(size / 2)
|
||||
ctx.gg.draw_line(0, center, size, center, gx.gray) // x axis
|
||||
ctx.gg.draw_line(center, 0, center, size, gx.gray) // y axis
|
||||
atime := f64( time.ticks() / 10 )
|
||||
|
@ -58,8 +58,8 @@ fn (ctx &Context) draw() {
|
|||
//y = (x + 3) * (x + 3) / stime + stime*2.5
|
||||
//y = math.sqrt(30.0 - x * x) * stime
|
||||
//y -= (stime-0.5) + stime
|
||||
ctx.gg.draw_rect(center + x * scale, center - y * scale, 1, 1, gx.blue)
|
||||
ctx.gg.draw_rect(center + x * scale, center + y * scale, 1, 1, gx.red)
|
||||
ctx.gg.draw_rect(f32(center + x * scale), f32(center - y * scale), 1, 1, gx.blue)
|
||||
ctx.gg.draw_rect(f32(center + x * scale), f32(center + y * scale), 1, 1, gx.red)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import rand
|
|||
import time
|
||||
|
||||
fn main() {
|
||||
rand.seed(time.now().unix)
|
||||
rand.seed(int(time.now().unix))
|
||||
|
||||
for _ in 0..10 {
|
||||
println('${rand.next(255)}.${rand.next(255)}.${rand.next(255)}.${rand.next(255)}')
|
||||
|
|
Loading…
Reference in New Issue