Permalink
Browse files

Update VM test and internal FFI specs.

  • Loading branch information...
1 parent 3c0e09f commit af5d86b2de7555eb5ab7f9b29234359314b46e37 @brixen brixen committed Dec 17, 2012
Showing with 60 additions and 2 deletions.
  1. +1 −0 spec/core/ffi/add_typedef_spec.rb
  2. +1 −0 spec/core/ffi/config_hash_spec.rb
  3. +1 −0 spec/core/ffi/config_spec.rb
  4. +1 −0 spec/core/ffi/find_type_spec.rb
  5. +1 −0 spec/core/ffi/library/attach_foreign.rb
  6. +1 −0 spec/core/ffi/library/attach_function_spec.rb
  7. +1 −0 spec/core/ffi/library/ffi_lib_spec.rb
  8. +1 −0 spec/core/ffi/library/native_function.rb
  9. +1 −0 spec/core/ffi/memorypointer/address_spec.rb
  10. +1 −0 spec/core/ffi/memorypointer/autorelease_spec.rb
  11. +1 −0 spec/core/ffi/memorypointer/clone_spec.rb
  12. +1 −0 spec/core/ffi/memorypointer/dup_spec.rb
  13. +1 −0 spec/core/ffi/memorypointer/element_reference_spec.rb
  14. +1 −0 spec/core/ffi/memorypointer/free_spec.rb
  15. +1 −0 spec/core/ffi/memorypointer/from_string_spec.rb
  16. +1 −0 spec/core/ffi/memorypointer/get_at_offset_spec.rb
  17. +1 −0 spec/core/ffi/memorypointer/inspect_spec.rb
  18. +1 −0 spec/core/ffi/memorypointer/new_spec.rb
  19. +1 −0 spec/core/ffi/memorypointer/null_spec.rb
  20. +1 −0 spec/core/ffi/memorypointer/plus_spec.rb
  21. +1 −0 spec/core/ffi/memorypointer/read_array_of_int_spec.rb
  22. +1 −0 spec/core/ffi/memorypointer/read_array_of_long_spec.rb
  23. +1 −0 spec/core/ffi/memorypointer/read_array_of_type_spec.rb
  24. +1 −0 spec/core/ffi/memorypointer/read_double_spec.rb
  25. +1 −0 spec/core/ffi/memorypointer/read_float_spec.rb
  26. +1 −0 spec/core/ffi/memorypointer/read_int_spec.rb
  27. +1 −0 spec/core/ffi/memorypointer/read_long_spec.rb
  28. +1 −0 spec/core/ffi/memorypointer/read_pointer_spec.rb
  29. +1 −0 spec/core/ffi/memorypointer/read_string_length_spec.rb
  30. +1 −0 spec/core/ffi/memorypointer/read_string_spec.rb
  31. +1 −0 spec/core/ffi/memorypointer/read_string_to_null_spec.rb
  32. +1 −0 spec/core/ffi/memorypointer/set_at_offset_spec.rb
  33. +1 −0 spec/core/ffi/memorypointer/total_spec.rb
  34. +1 −0 spec/core/ffi/memorypointer/type_size_spec.rb
  35. +1 −0 spec/core/ffi/memorypointer/write_array_of_int_spec.rb
  36. +1 −0 spec/core/ffi/memorypointer/write_array_of_long_spec.rb
  37. +1 −0 spec/core/ffi/memorypointer/write_array_of_pointer_spec.rb
  38. +1 −0 spec/core/ffi/memorypointer/write_array_of_type_spec.rb
  39. +1 −0 spec/core/ffi/memorypointer/write_double_spec.rb
  40. +1 −0 spec/core/ffi/memorypointer/write_float_spec.rb
  41. +1 −0 spec/core/ffi/memorypointer/write_int_spec.rb
  42. +1 −0 spec/core/ffi/memorypointer/write_long_spec.rb
  43. +1 −0 spec/core/ffi/memorypointer/write_pointer_spec.rb
  44. +1 −0 spec/core/ffi/memorypointer/write_string_length_spec.rb
  45. +1 −0 spec/core/ffi/memorypointer/write_string_spec.rb
  46. +1 −0 spec/core/ffi/platform_spec.rb
  47. +1 −0 spec/core/ffi/pointer_spec.rb
  48. +1 −0 spec/core/ffi/size_to_type_spec.rb
  49. +1 −0 spec/core/ffi/struct/config_spec.rb
  50. +1 −0 spec/core/ffi/struct/element_reference_spec.rb
  51. +1 −0 spec/core/ffi/struct/element_set_spec.rb
  52. +1 −0 spec/core/ffi/struct/free_spec.rb
  53. +1 −0 spec/core/ffi/struct/initialize_copy_spec.rb
  54. +1 −0 spec/core/ffi/struct/layout_spec.rb
  55. +1 −0 spec/core/ffi/struct/new_spec.rb
  56. +1 −0 spec/core/ffi/struct/pointer_spec.rb
  57. +1 −0 spec/core/ffi/struct/size_spec.rb
  58. +1 −0 spec/core/ffi/type_size_spec.rb
  59. +1 −1 spec/core/profiler/instrumenter/fixtures/classes.rb
  60. +1 −1 vm/test/test_ontology.hpp
View
1 spec/core/ffi/add_typedef_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI.add_typedef" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/config_hash_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI.config_hash" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/config_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI.config" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/find_type_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI.find_type" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/library/attach_foreign.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../spec_helper', __FILE__)
+require 'ffi'
# TODO: This method no longer exists. Rework appropriate specs for
# #attach_function and remove this file
View
1 spec/core/ffi/library/attach_function_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Library#attach_function" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/library/ffi_lib_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Library#ffi_lib" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/library/native_function.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../spec_helper', __FILE__)
+require 'ffi'
# TODO: Obsolete. Rework if appropriate for FFI::Library#attach_function
View
1 spec/core/ffi/memorypointer/address_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#address" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/autorelease_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#autorelease=" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/clone_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#clone" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/dup_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#dup" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/element_reference_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#[]" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/free_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#free" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/from_string_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer.from_string" do
it "creates a new FFI::MemoryPointer from a String" do
View
1 spec/core/ffi/memorypointer/get_at_offset_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#get_at_offset" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/inspect_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#inspect" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/new_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer.new" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/null_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#null?" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/plus_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#+" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_array_of_int_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_array_of_int" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_array_of_long_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_array_of_long" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_array_of_type_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_array_of_type" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_double_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_double" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_float_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_float" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_int_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_int" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_long_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_long" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_pointer_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_pointer" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_string_length_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_string_length" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_string_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_string" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/read_string_to_null_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#read_string_to_null" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/set_at_offset_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#set_at_offset" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/total_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#total" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/type_size_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#type_size" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_array_of_int_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_array_of_int" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_array_of_long_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_array_of_long" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_array_of_pointer_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_array_of_pointer" do
it "writes an array of pointers to self" do
View
1 spec/core/ffi/memorypointer/write_array_of_type_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_array_of_type" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_double_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_double" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_float_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_float" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_int_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_int" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_long_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_long" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_pointer_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_pointer" do
it "writes another pointer to self" do
View
1 spec/core/ffi/memorypointer/write_string_length_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_string_length" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/memorypointer/write_string_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::MemoryPointer#write_string" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/platform_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Platform::LIBSUFFIX" do
platform_is :linux do
View
1 spec/core/ffi/pointer_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Pointer#size" do
it "matches 1.size" do
View
1 spec/core/ffi/size_to_type_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI.size_to_type" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/config_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct.config" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/element_reference_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct#[]" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/element_set_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct#[]=" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/free_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct#free" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/initialize_copy_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct#initialize_copy" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/layout_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct.layout" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/new_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
module FFIStructSpecs
DummyLayout = [:a, :int, 0]
View
1 spec/core/ffi/struct/pointer_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct#pointer" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/struct/size_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI::Struct.size" do
it "needs to be reviewed for spec completeness"
View
1 spec/core/ffi/type_size_spec.rb
@@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require 'ffi'
describe "FFI.type_size" do
it "needs to be reviewed for spec completeness"
View
2 spec/core/profiler/instrumenter/fixtures/classes.rb
@@ -1,5 +1,5 @@
module ProfilerSpecs
- extend FFI::Library
+ extend Rubinius::FFI::Library
attach_function :rand, [], :int
View
2 vm/test/test_ontology.hpp
@@ -185,7 +185,7 @@ class TestObjects : public CxxTest::TestSuite, public VMTest {
TS_ASSERT_EQUALS(cls->class_object(state), G(klass));
TS_ASSERT_EQUALS(cls->superclass(), G(object));
- Module* ffi = as<Module>(G(object)->get_const(state, "FFI"));
+ Module* ffi = as<Module>(G(rubinius)->get_const(state, "FFI"));
TS_ASSERT_EQUALS(cls, ffi->get_const(state, "Pointer"));
}

0 comments on commit af5d86b

Please sign in to comment.