if "NIT_TESTING".environ == "true" then exit 0
opts.parse args
-if not opts.errors.is_empty or opts.help.value == true then
+if not opts.errors.is_empty or opts.help.value then
print opts.errors.join("\n")
print "Usage: benitlux_daily [Options]"
opts.usage
fun easy_setopt(opt: CURLOption, obj: Object): CURLCode
do
if obj isa Int then return native_setopt_int(opt, obj)
- if obj isa Bool and obj == true then return native_setopt_int(opt, 1)
- if obj isa Bool and obj == false then return native_setopt_int(opt, 0)
+ if obj == true then return native_setopt_int(opt, 1)
+ if obj == false then return native_setopt_int(opt, 0)
if obj isa String then return native_setopt_string(opt, obj)
if obj isa FileWriter then return native_setopt_file(opt, obj._file.as(not null))
if obj isa CURLSList then return native_setopt_slist(opt, obj)
var r = new Array[String]
var cursor = self
loop
- if native_data_reachable(cursor) != true then break
+ if not native_data_reachable(cursor) then break
r.add(native_data(cursor))
cursor = native_next(cursor)
end
var socket: nullable TCPStream = null
# Is this connection connected?
- fun connected: Bool do return socket != null and socket.connected == true
+ fun connected: Bool do return socket != null and socket.connected
# `BinarySerializer` used to send data to this client through `socket`
var writer: BinarySerializer is noinit
var method = http_request.method
var response: HttpResponse
- if is_teapot == true then
+ if is_teapot then
response = new HttpResponse(418)
response.body = "I'm a teapot!\n"
response.header["Content-Type"] = "text"
bad_conception_elements.add(new FeatureEnvy(phase))
bad_conception_elements.add(new LongMethod(phase))
for bad_conception_element in bad_conception_elements do
- if bad_conception_element.collect(self.mclassdef,phase.toolcontext.modelbuilder) == true then array_badconception.add(bad_conception_element)
+ if bad_conception_element.collect(self.mclassdef,phase.toolcontext.modelbuilder) then array_badconception.add(bad_conception_element)
end
end
assert postgres_ntuples: result.ntuples == 2 else print_error db.error
assert postgres_nfields: result.nfields == 3 else print_error db.error
assert postgres_fname: result.fname(0) == "aname" else print_error db.error
-assert postgres_isnull: result.is_null(0,0) == false else print_error db.error
+assert postgres_isnull: not result.is_null(0,0) else print_error db.error
assert postgres_value: result.value(0,0) == "Whale" else print_error db.error
var cols: Int = result.nfields
assert postgres_nfields: result.nfields == 4 else print_error db.error
assert postgres_fname: result.fname(0) == "uname" else print_error db.error
-assert postgres_isnull: result.is_null(0,0) == false else print_error db.error
+assert postgres_isnull: not result.is_null(0,0) else print_error db.error
assert postgres_value: result.value(0,0) == "Bob" else print_error db.error
assert drop_table: db.execute("DROP TABLE users_{db_suffix}") else print db.error