search for: test_list

Displaying 17 results from an estimated 17 matches for "test_list".

2014 Apr 14
1
duplication regression (?)
...ase for it. I stumbled across it when playing with recent changes in R relating to duplication. Does the example use undefined syntax? ----- fn1 <- function(mylist) { fn1a <- function() mylist[[c(1,1)]][[1]] <<- 9 fn1a() return(NULL) } fn2 <- function(myarg) fn1(myarg) test_list <- list(list(list(1))) print(test_list[[c(1,1,1)]]) fn2(test_list) print(test_list[[c(1,1,1)]]) ----- Before r64970 the output is [1] 1 [1] 1 After r64970 the output is [1] 1 [1] 9 > sessionInfo() R Under development (unstable) (2014-04-10 r65396) Platform: x86_64-unknown-linux-gnu (64-bit...
2005 Mar 09
9
Unit testing + instance variables
...Test::Unit::TestCase def setup @controller = RecipeController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new create_fixtures "recipes" create_fixtures "categories" end def test_list get :list # This step seems exessively complex, and took me a while to figure out my_inst_vars = @controller.instance_variable_get "@assigns" assert_equal( 5, my_inst_vars["recipes"].size ) assert_equal( 8, my_inst_vars["categories&...
2010 Sep 06
2
dataframe row names from list
Hi, I have a list which looks like this... > str(y) List of 10 $ : chr [1:4] "ABCD" "5" "0" "1" $ : chr [1:4] "DEF" "15" "1" "16" $ : chr [1:4] "AAA" "2" "17" "8" $ : chr [1:4] "SSS" "15" "25" "1" $ : chr [1:4] "III"
2002 Nov 21
2
[LLVMdev] DSnode type question
Dear LLVM, When I use analyze to construct the DSGraph for the lists.c program in test/Programs/SingleSource/Shootout directory. I found out the heap node in the function test_list() all have type FOLDED:R. I was wondering why it's not heapnode anymore? My pass need to use this type information to determine whether a node is heap node. Is there any way I can know this is a heap node in this case? Thanks, xiaodong
2002 Dec 02
1
[LLVMdev] DSnode type question
...rtant because my code depends on this information. Thanks, Jerry On Thu, 21 Nov 2002, Chris Lattner wrote: > > When I use analyze to construct the DSGraph for the lists.c program in > > test/Programs/SingleSource/Shootout directory. I found out the heap node > > in the function test_list() all have type FOLDED:R. I was wondering why > > it's not heapnode anymore? My pass need to use this type information to > > determine whether a node is heap node. Is there any way I can know this is > > a heap node in this case? > > Folded nodes are nodes where the typ...
2006 May 18
4
WebServices and DateTime - 3 elements of civil date are necessary
I simply trying to receive an array of objects, retrieved by ActiveRecord from table with datetime column and I have: test_list(SoapControllerApiTest): ArgumentError: 3 elements of civil date are necessary /usr/lib/ruby/1.8/date.rb:1214:in `new_with_hash'' /usr/lib/ruby/1.8/date.rb:1258:in `parse'' .... It''s a bug or I am wrong somewhere?
2015 May 11
3
[PATCH 1/2] mllib: Require OUnit2 for tests.
...d doc) -let test_int () = +let test_int ctx = let doc = [ "test_zero", JSON.Int 0; "test_pos", JSON.Int 5; "test_neg", JSON.Int (-5); @@ -71,7 +71,7 @@ let test_int () = }" (JSON.string_of_doc ~fmt:JSON.Indented doc) -let test_list () = +let test_list ctx = let doc = [ "item", JSON.List [ JSON.String "foo"; JSON.Int 10; JSON.Bool true ] ] in assert_equal_string "{ \"item\": [ \"foo\", 10, true ] }" @@ -86,7 +86,7 @@ let test_list () = }" (JSON.string_of_d...
2005 Dec 20
2
printing/logging during tests
..., I''m trying to output some info to see what''s happening in a controller during functional tests. Problem: ''print'' only works in the test code, but not in the production code that''s being called by the tests. Example: In FooControllerTest: def test_list print "1: starting" <<----- WORKS FINE get :list end In FooController def list print "2: inside" <<----- DOESN''T WORK logger.error "2: inside too" <<----- DOESN''T WORK :...
2015 Jan 23
0
[PATCH 2/2] mllib: add simple tests for the JSON module
...0 }" + (JSON.string_of_doc doc); + assert_equal_string + "{ + \"test_zero\": 0, + \"test_pos\": 5, + \"test_neg\": -5, + \"test_pos64\": 10, + \"test_neg64\": -10 +}" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +let test_list () = + let doc = [ "item", JSON.List [ JSON.String "foo"; JSON.Int 10; JSON.Bool true ] ] in + assert_equal_string + "{ \"item\": [ \"foo\", 10, true ] }" + (JSON.string_of_doc doc); + assert_equal_string + "{ + \"item\":...
2015 Jan 23
2
[PATCH 1/2] mllib: tests: add tests for string_lines_split
--- mllib/common_utils_tests.ml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mllib/common_utils_tests.ml b/mllib/common_utils_tests.ml index 09d5c51..283e9a1 100644 --- a/mllib/common_utils_tests.ml +++ b/mllib/common_utils_tests.ml @@ -27,6 +27,7 @@ let prog = "common_utils_tests" let assert_equal_string = assert_equal ~printer:(fun x -> x) let
2019 Feb 25
0
[PATCH 2/3] v2v: add Var_expander
...}, %{INDEX}, %{INDEX}" in + let index = ref 0 in + let fn = function + | "INDEX" -> + incr index; + Some (string_of_int !index) + | _ -> None + in + assert_equal_string "1, 2, 3" (Var_expander.replace_fn str fn) + end; + () + +let test_list () = + assert_equal_string "x %{NONE}" (Var_expander.replace_list "%{FOO} %{NONE}" [("FOO", "x")]); + () + +let test_scan_variables () = + let assert_invalid_variable var = + let str = "%{" ^ var ^ "}" in + assert_raises (Var_expa...
2006 Jan 10
0
auto_link generating error (nil.gsub) in functional test
Hi everyone, When running tests, I get this error for running auto_link on a set of column data: test_list(PersonnelControllerTest): ActionView::TemplateError: You have a nil object when you didn''t expect it! The error occured while evaluating nil.gsub On line #28 of app/views/personnel/list.rhtml 25: <tr valign="top" class="<%= alternate_rows %>">...
2002 Nov 21
0
[LLVMdev] DSnode type question
> When I use analyze to construct the DSGraph for the lists.c program in > test/Programs/SingleSource/Shootout directory. I found out the heap node > in the function test_list() all have type FOLDED:R. I was wondering why > it's not heapnode anymore? My pass need to use this type information to > determine whether a node is heap node. Is there any way I can know this is > a heap node in this case? Folded nodes are nodes where the type information in LLVM is...
2018 Aug 20
6
[PATCH 0/4] mltools: JSON unification
An evolution of: https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
2019 Mar 29
5
[PATCH v2 0/3] v2v: add -o json output mode
This series adds a new output mode for virt-v2v, called -o json. It produces local files, just like -o local, although the metadata produced is a JSON file with data that v2v collected in the conversion process. This can be useful for converting to unsupported destinations, still based on QEMU/KVM. In addition to a simple different metadata, it offers a way to relocate the disks, with
2019 Feb 25
7
[PATCH 0/3] RFC: v2v: add -o json output mode
This series adds a new output mode for virt-v2v, called -o json. It produces local files, just like -o local, although the metadata produced is a JSON file with data that v2v collected in the conversion process. This can be useful for converting to unsupported destinations, still based on QEMU/KVM. In addition to a simple different metadata, it offers a way to relocate the disks, with
2005 Nov 16
19
Concerns over Rails' handling of tests
Sorry if this comes across as a bunch of disjointed thoughts...I''m just trying to put my thoughts down and I''d like to know what other people''s opinions on the subject are. I''ve been working with Rails for 3 or 4 months now and I''m constantly trying to look at ways of improving my testing techniques, especially when it comes to TDD. I have a few